flutter create 项目名 —platforms=windows |
创建flutter项目, .表示在当前文件夹 指定要创建的平台, 默认全部 |
---|---|
flutter pub get | 下载pubspec中指定的第三方依赖包 |
flutter pub add xxx | 下载第三方包, 并添加到pubspec |
flutter run -d windows/linux/macos/chrome —verbose-system-logs |
运行main.dart 指定运行系统 显示系统日志 |
flutter upgrade | 升级flutter SDK |
flutter clean | 清除缓存 |
flutter doctor | 检查flutter状态 |
flutter devices | 获取所有真机设备列表包括iOS模拟器 |
flutter build windows —target-platform windows-arm64 —release |
编绎出windows平台的可执行文件 交叉编绎arm架构 release模式 win生成文件目录: xx\build\windows\runner\Release mac生成文件目录: xx/build/macos/Build/Products/Release/ws_chat_flutter.app/Contents/MacOS/ |
flutter config —enable-linux-desktop | 激活Linux桌面端 |
flutter config —enable-macos-desktop | 激活Mac桌面端 |
flutter config —enable-windows-desktop | 激活Windows桌面端 |
flutter config —no-enable-web | 禁用web端 |