功能描述 | 命令 |
---|---|
安装依赖包 | flutter pub get |
检查哪些依赖包过期 | flutter pub outdated |
检查项目依赖包是否支持空安全 | dart pub outdated --mode=null-safety |
升级依赖包 | flutter pub upgrade |
升级依赖包-大版本 | flutter pub upgrade --major-versions |
将项目代码迁移到空安全 | dart migrate |
自动修复代码问题 | dart fix --apply |
打包 Android bundle | flutter build appbundle |
打包 Android apks | flutter build apk --split-per-abi |
打包 iOS | flutter build ios |
Debug 模式运行 | flutter run |
Profile 模式运行 | flutter run --profile |
Release 模式运行 | flutter run --release |
指定 Web 渲染模式 | flutter run -d chrome --web-renderer html |
发布包检查 | flutter packages pub publish --dry-run |
发布包 | flutter packages pub publish --server=https://pub.dartlang.org |
/ Flutter 常用命令
Created
Sat, 12 Feb 2022 15:00:00 +0000