1. Collapse/expand the code
[command + "-"] / [command + "+"]
Copy the code
2. Automatically create a StatelessWidget or StatefulWidget
["stf" + enter] / ["stl" + enter]
Copy the code
3. Quickly call up the surround code
command + option + "t"
Copy the code
Sometimes you need to add if, for, while, etc. Use: Select the code and click on Command and option and t to bring up the following menu. Select the corresponding one.
4. Add methods to the class
Add some constructors, set&get, etc. to the newly written class
command + 'n'
Copy the code
5. View subclass implementations of abstract classes or methods
option + command + "b"
Copy the code
6. Move code
option + shiftKey +Copy the code
7. Convert statelessWidget to StatefulWidget
options + enter
Copy the code
Place the cursor over the widget and press Options + Enter. This shortcut has many other functions, such as wrapping a widget around it
Reference Documents:
Juejin. Cn/post / 684516…