showUpdate static method

UpdateDialog showUpdate(
  1. BuildContext context, {
  2. double width = 0.0,
  3. required String title,
  4. required String updateContent,
  5. required VoidCallback onUpdate,
  6. double titleTextSize = 16.0,
  7. double contentTextSize = 14.0,
  8. double buttonTextSize = 14.0,
  9. double progress = -1.0,
  10. Color progressBackgroundColor = const Color(0xFFFFCDD2),
  11. Image? topImage,
  12. double extraHeight = 5.0,
  13. double radius = 4.0,
  14. Color themeColor = Colors.red,
  15. bool enableIgnore = false,
  16. VoidCallback? onIgnore,
  17. String? updateButtonText,
  18. String? ignoreButtonText,
  19. bool isForce = false,
})

显示版本更新提示框

Implementation

static UpdateDialog showUpdate(BuildContext context,
    {double width = 0.0,
    required String title,
    required String updateContent,
    required VoidCallback onUpdate,
    double titleTextSize = 16.0,
    double contentTextSize = 14.0,
    double buttonTextSize = 14.0,
    double progress = -1.0,
    Color progressBackgroundColor = const Color(0xFFFFCDD2),
    Image? topImage,
    double extraHeight = 5.0,
    double radius = 4.0,
    Color themeColor = Colors.red,
    bool enableIgnore = false,
    VoidCallback? onIgnore,
    String? updateButtonText,
    String? ignoreButtonText,
    bool isForce = false}) {
  final UpdateDialog dialog = UpdateDialog(context,
      width: width,
      title: title,
      updateContent: updateContent,
      onUpdate: onUpdate,
      titleTextSize: titleTextSize,
      contentTextSize: contentTextSize,
      buttonTextSize: buttonTextSize,
      progress: progress,
      topImage: topImage,
      extraHeight: extraHeight,
      radius: radius,
      themeColor: themeColor,
      progressBackgroundColor: progressBackgroundColor,
      enableIgnore: enableIgnore,
      isForce: isForce,
      updateButtonText: updateButtonText,
      ignoreButtonText: ignoreButtonText,
      onIgnore: onIgnore);
  dialog.show();
  return dialog;
}