Flutter - 常用快捷键

我是使用android studio开发的,简单记录一下

command 加 +/-
  • 展开/折叠代码
option + enter
  • 将 widget 自动包裹一层 widget 或删除这层 widget,StatelessWidget转 StatefulWidget等等
  • 快速导包
command + option + t
  • 有时需要在一些代码外面加上 if 、for、while 等代码,快速调出环绕代码
command + n
  • 新写一个类的时候,有时候需要添加一些方法,比如构造方法,set & get 等
option + command + b
  • 查看抽象类或方法的子类实现
  • 在看源码过程中,看到一些抽象类或方法,希望能看子类具体实现,或者看看有哪些子类。
option + shift + 上下键
  • 移动代码
command + option + L
  • 格式化代码
control + option + I
  • 自动缩进对齐/代码对齐
command+ shift + enter
  • if后面自动加(){ }
command + option + M
  • 抽离代码
command+ shift + W
  • 抽离widget
commond + d
  • 快速复制一行

你可能感兴趣的:(Flutter - 常用快捷键)