flutter-AS快捷鍵

小二1486899418000發表於2020-07-06

1.摺疊/展開程式碼

[command + "-"] / [command + "+"]
複製程式碼

2.自動建立 StatelessWidget 或 StatefulWidget

["stf" + enter] / ["stl" + enter]
複製程式碼

3.快速調出環繞程式碼

command + option + "t"
複製程式碼

有時需要在一些程式碼外面加上 if 、for、while 等程式碼。 使用:選中程式碼,點選 command 和 option 和 t 彈出如下選單。選擇對應的即可。

4.給類增加方法

給新寫的類新增一些構造方法,set&get等

command + 'n'
複製程式碼

5.檢視抽象類或方法的子類實現

option + command + "b"
複製程式碼

6.移動程式碼

option + shift + 上下鍵
複製程式碼

7.將statelesswidget轉換為statefulwidget

options + enter
複製程式碼

游標放在widget上,按options + enter,這個快捷鍵還有很多功能,比如包裹一個widget在外層

參考文件:

juejin.im/post/5efea8…

相關文章