1. Wrap a Widget with a parent element: Place the cursor over the current Widget, option + Enter, and wrap with XXX appears

You can also quickly Remove this Widget: Remove this Widget

  1. After defining a variable, quickly Create a constructor for the current variable: place the cursor over the defined variable, option + Enter, and select Create Constructor for XXX

  1. To quickly import a package, move the cursor over the offending Class, option + Press Enter, and select Import Library XXX

  1. To view the definition of the current class or to view the implementation of a method: Press and hold Command to change the mouse shape into a hand shape and click to enter the implementation page of the class method, or place the cursor over a class and Command + b directly enters the implementation page of the class method and quickly close the current page: The Command + w;
  2. Find a file: Double-click Shift; Command + Shift + f;
  3. Rename variable (function) : Shift + F6, all variable names will change to the new name;
  4. Convert a variable (class name or lines of code) to all uppercase letters: Command + Shift + U, click again to switch back
  5. To quickly create an inheritance in StatefulWidget/StatelessWidget class directly write st, the editor will automatically appear optional component sta to quickly create a class containing AnimationController variable

To Extract the code into a single class, right-click the code to Extract ->Refactor->Extract Flutter Widget. Enter a class name to automatically generate a class, or select Extract Method… Extract a function

10. Commond + d Quickly copy a row.

11. Edit multiple lines at the same time: Hold down Option and push the cursor, multiple cursors will appear. Edit multiple lines at the same time, press ESC after editing, or click another place to exit.

11. Move the current line up or down: Option + Shift + up (down) arrow

12. Move the cursor to the place where it was last edited: Option +Command+ left arrow, click to view a method on a page with a lot of code (or when viewing the source code), and then go back to the original position. Option +Command+ opposite direction of right arrow.

If there is no comma at the end of the code, try to condense the code into one line. If there is a comma at the end of the code, the code will be divided into multiple lines.

14. Quick line wrap: When the cursor is not at the end of a line and you want to press Enter to wrap the line, this will bring the following line to the next line. Hold Down Shift and press Enter to quickly wrap the line.

To view the subclass of the current class, place the cursor over the name of the class you want to view, Ctrl + H, you can view all subclasses that inherit from this class. There are many classes in Flutter. Sometimes we don’t know which class to use to assign attributes to Flutter.

Custom shortcuts can be defined in Preference->Keymap.