Flutter 常用命令
命令 | 说明 | 备注 |
---|---|---|
flutter create | 在指定的目录创建一个新的Flutter项目 | |
flutter run | 在附加设备或仿真器上运行Flutter应用程序 | |
flutter analyze | 分析项目的dart代码 | |
flutter assemble | 组装和构建Flutter资源 | |
flutter attach | 附加到正在运行的应用 | |
flutter bash-completion | 输出命令行shell完成设置脚本 | |
flutter build | Flutter构建命令 | |
flutter channel | 列出或切换通道 | 例如:flutter channel beta |
flutter clean | 清理构建缓存的build文件夹 | |
flutter config | 配置flutter | 例如开启web:flutter config –enable–web |
flutter devices | 列出所连接的设备 | 包括模拟器、真机、Android、IOS设备 |
flutter doctor | 显示有关已安装工具的信息 | |
flutter drive | 为当前工程运行驱动测试程序 | |
flutter format | 格式化一个或多个Dart文件 | |
flutter install | 在连接设备上安装Flutter应用 | |
flutter logs | 显示正在运行的Flutter应用的日志 | |
flutter precache | 填充Flutter工具的二进制工件缓存 | |
flutter pub | 用于管理Flutter软件包的命令 | |
flutter screenshot | 对应用截图 | |
flutter test | 在当前项目中运行Flutter的单元测试 | |
flutter upgrade | 更新flutter | |
flutter version | 列出或切换Flutter版本 |