flutter_app_update

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter app update

Chinese Doc #
一、Introduce #

Android update use AppUpdate library
Add to pubspec.yaml pub versions

dependencies:
flutter_app_update: ^latest_version
copied to clipboard

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'));
copied to clipboard

Listener download

@override
void initState() {
super.initState();
AzhonAppUpdate.listener((map) {
debugPrint('app update listener: ${jsonEncode(map)}');
});
}
copied to clipboard


Type
Keys
Type of data
Remark


onButtonClick
id
int
Update dialog button click event(0:confirm,1:cancel)


start
/
/
Start download


downloading
max
int
Downloading, apk file size


progress
int
Current progress


done
apk
String
Downloaded, apk path


cancel
/
/
Cancel download


error
exception
String
Download error


三、Screenshot #

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.