appUpgrade static method
dynamic
appUpgrade(
- BuildContext context,
- Future<
AppUpgradeInfo?> future, { - TextStyle? titleStyle,
- TextStyle? contentStyle,
- String? cancelText,
- TextStyle? cancelTextStyle,
- String? okText,
- TextStyle? okTextStyle,
- List<
Color> ? okBackgroundColors, - Color? progressBarColor,
- double borderRadius = 20.0,
- String? iosAppId,
- AppMarketInfo? appMarketInfo,
- VoidCallback? onCancel,
- VoidCallback? onOk,
- DownloadProgressCallback? downloadProgress,
- DownloadStatusChangeCallback? downloadStatusChange,
- bool isDark = false,
Implementation
static appUpgrade(
BuildContext context,
Future<AppUpgradeInfo?> future, {
TextStyle? titleStyle,
TextStyle? contentStyle,
String? cancelText,
TextStyle? cancelTextStyle,
String? okText,
TextStyle? okTextStyle,
List<Color>? okBackgroundColors,
Color? progressBarColor,
double borderRadius = 20.0,
String? iosAppId,
AppMarketInfo? appMarketInfo,
VoidCallback? onCancel,
VoidCallback? onOk,
DownloadProgressCallback? downloadProgress,
DownloadStatusChangeCallback? downloadStatusChange,
bool isDark = false,
}) {
future.then((AppUpgradeInfo? appUpgradeInfo) {
if (appUpgradeInfo != null) {
_showUpgradeDialog(
context,
appUpgradeInfo.title,
appUpgradeInfo.contents,
apkDownloadUrl: appUpgradeInfo.apkDownloadUrl,
force: appUpgradeInfo.force,
titleStyle: titleStyle,
contentStyle: contentStyle,
cancelText: cancelText,
cancelTextStyle: cancelTextStyle,
okBackgroundColors: okBackgroundColors,
okText: okText,
okTextStyle: okTextStyle,
borderRadius: borderRadius,
progressBarColor: progressBarColor,
iosAppId: iosAppId,
appMarketInfo: appMarketInfo,
onCancel: onCancel,
onOk: onOk,
downloadProgress: downloadProgress,
downloadStatusChange: downloadStatusChange,
isDark: isDark,
);
}
}).catchError((onError) {
debugPrint("显示出错:$onError");
// print('$onError');
});
}