appUpgrade static method

dynamic appUpgrade(
  1. BuildContext context,
  2. AppUpgradeInfo appUpgradeInfo, {
  3. TextStyle? titleStyle,
  4. TextStyle? contentStyle,
  5. String cancelText = "以后再说",
  6. TextStyle? cancelTextStyle,
  7. String okText = "",
  8. TextStyle? okTextStyle,
  9. Color? progressBarColor,
  10. String iosAppId = "立即更新",
  11. VoidCallback? onCancel,
  12. VoidCallback? onOk,
  13. DownloadProgressCallback? downloadProgress,
  14. DownloadStatusChangeCallback? downloadStatusChange,
})

Implementation

static appUpgrade(
    BuildContext context,
    AppUpgradeInfo appUpgradeInfo, {
    TextStyle? titleStyle,
    TextStyle? contentStyle,
    String cancelText = "以后再说",
    TextStyle? cancelTextStyle,
    String okText = "",
    TextStyle? okTextStyle,
    Color? progressBarColor,
    String iosAppId="立即更新",
    VoidCallback? onCancel,
    VoidCallback? onOk,
    DownloadProgressCallback? downloadProgress,
    DownloadStatusChangeCallback? downloadStatusChange,
  }) {
    return _showUpgradeDialog(
            context, appUpgradeInfo.title, appUpgradeInfo.contents,
            apkDownloadUrl: appUpgradeInfo.appDownloadUrl,
            force: appUpgradeInfo.force,
            titleStyle: titleStyle,
            contentStyle: contentStyle,
            cancelText: cancelText,
            cancelTextStyle: cancelTextStyle,
            okText: okText,
            okTextStyle: okTextStyle,
            downloadApkName: appUpgradeInfo.appDownloadName,
            onCancel: onCancel,
            onOk: onOk,
            downloadProgress: downloadProgress,
            downloadStatusChange: downloadStatusChange);
  }