Last updated:
0 purchases
kooboo flutter app upgrade
kooboo_flutter_app_upgrade #
Android app应用内升级,iOS跳转至AppStore
安装:
dependencies:
flutter:
sdk: flutter
kooboo_flutter_app_upgrade: ^0.0.9
copied to clipboard
导入:
import 'package:flutter_app_upgrade/flutter_app_upgrade.dart';
copied to clipboard
使用:
///下载并安装apk(仅适用于Android)
FlutterAppUpgrade.downloadApkInstall('url','1.0.1');
///监听下载进度
FlutterAppUpgrade.onListenStreamData(
(event) {
debugPrint('_MyAppState.initState receive data $event');
},
onError: (error) {
debugPrint('_MyAppState.initState receive error ${error.message}');
},
);
///增量更新apk(仅适用于Android)
String apkDownloadPath =await FlutterAppUpgrade.apkDownloadPath;
FlutterAppUpgrade.patchInstallAppForAndroid('$apkDownloadPath/app-V1.0_2.0.patch');
///跳转应用市场(仅适用于Android)
FlutterAppUpgrade.goToMarket();
///跳转Google应用市场(仅适用于Android)
FlutterAppUpgrade.goToGoogleMarket();
///跳转AppStore(仅适用于iOS)
FlutterAppUpgrade.goToAppStore('appId');
copied to clipboard
参考:
Android增量更新原理和实践
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.