# flutter_my_app **Repository Path**: DengLibin/flutter_my_app ## Basic Information - **Project Name**: flutter_my_app - **Description**: flutter_my_app - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-19 - **Last Updated**: 2026-02-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 1.环境 ## 1.下载flutter sdk (内置dart sdk) https://docs.flutter.dev/install/archive 支持win7版本: 3.19, dart:3.3 配置环境变量 测试: flutter --version ## 2.项目 想要所有平台(默认行为): flutter create my_app 只创建 Windows 桌面项目: flutter create -t app --platforms=windows my_app 只要 Android + iOS: flutter create -t app --platforms=android,ios my_app 进入项目目录运行: flutter run flutter run -d windows ## 3.依赖 flutter pub get # 下载依赖 flutter pub upgrade # 更新依赖 仓库地址:https://pub.dev/ 国内:https://pub-web.flutter-io.cn/ # 临时使用 export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn # Windows PowerShell setx PUB_HOSTED_URL https://pub.flutter-io.cn setx FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn 或者: setx FLUTTER_STORAGE_BASE_UR https://mirrors.tuna.tsinghua.edu.cn/flutter setx PUB_HOSTED_URL https://mirrors.tuna.tsinghua.edu.cn/dart-pub ## 4.打包 flutter build apk/windows -t lib/xxx/xxx.dart -t: 指定入口文件 ## 2.grpc 安装插件 ```shell dart pub global activate protoc_plugin ``` 下载的插件加入环境变量 C:\Users\mdjro\AppData\Local\Pub\Cache\bin 依赖: ```shell grpc: ^4.1.0 protobuf: ^4.1.0 ``` 生成代码: lib下新建hello文件夹,然后执行 protoc --dart_out=grpc:lib/hello --proto_path=proto proto/hello.proto rpc依赖rust_grpc服务端