目录
前言
软件发布和更新是肯定要做的。Flutter在安卓和IOS上面发布是不一样的。而且我也没有IOS的手机,只有一个破小米。所以我们这里以Android 为例。
相关链接
flutter Android 打包和发布:https://zhuanlan.zhihu.com/p/602250391
构建和发布为 Android 应用:https://docs.flutter.cn/deployment/android
软件推荐
为了方便调试,我这里推荐两个软件
localSend 局域网跨设备互传文件:https://github.com/localsend/localsend
Anlink 免费无广告的电脑手机投屏软件:https://cn.anlinksoft.com/download/
Andriod打包
直接按照这个流程,打包
flutter Android 打包和发布:https://zhuanlan.zhihu.com/p/602250391
更改软件icon
官方推荐使用这个库来设置多平台的图标。
flutter_launcher_icons 0.13.1:https://pub-web.flutter-io.cn/packages/flutter_launcher_icons
dev_dependencies:
......
flutter_lints: ^3.0.0
flutter_launcher_icons:
android: "launcher_icon"
ios: false
image_path: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
web:
generate: false
image_path: "path/to/image.png"
background_color: "#hexcode"
theme_color: "#hexcode"
windows:
generate: false
image_path: "path/to/image.png"
icon_size: 48 # min:48, max:256, default: 48
macos:
generate: false
image_path: "path/to/image.png"
命令行运行:
flutter pub get
flutter pub run flutter_launcher_icons