Chinese Doc
一、Introduce
- Android update use AppUpdate library
- Add to pubspec.yaml pub versions
dependencies:
flutter_app_update: ^latest_version
- Create
UpdateModel
and set apk url
UpdateModel model = UpdateModel(
url,
"flutterUpdate.apk",
/// android res/mipmap icon name
"ic_launcher",
'https://itunes.apple.com/cn/app/xxxx',
);
AzhonAppUpdate.update(model).then((value) => debugPrint('$value'));
- Add listener
@override
void initState() {
super.initState();
AzhonAppUpdate.listener((ResultModel model) {
debugPrint('$model');
});
}
三、Screenshot