Flutter如何热加载 热重启
Flutter如何热加载 热重启下面一起看看。
flutter run 运行项目
flutter run -d all 把项目运行在所有设备
Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
Flutter项目常用的快捷键 需要运行后再控制台输入哦
r 键 :Flutter热加载命令。
R键:Flutter热重启项目命令。
p 键:显示网格,这个可以很好的掌握布局情况,工作中很有用。
o 键:切换android和ios的预览模式。
q 键:退出调试预览模式。
查看设备
flutter devices
$ flutter devices
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
3 connected devices:
Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.19043.1766]
Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
Edge (web) • edge • web-javascript • Microsoft Edge 103.0.1264.49
运行在所有的设备
flutter run -d all
指定设备运行
flutter run -d chrome