UpdateDialog constructor

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

Implementation

UpdateDialog(BuildContext context,
    {double width = 0.0,
    required String title,
    required String updateContent,
    required VoidCallback onUpdate,
    required VoidCallback onInstall,
    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,
    bool isForce = false,
    String? updateButtonText,
    String? ignoreButtonText,
    VoidCallback? onClose}) {
  _widget = UpdateWidget(
      width: width,
      title: title,
      updateContent: updateContent,
      onUpdate: onUpdate,
      onInstall: onInstall,
      titleTextSize: titleTextSize,
      contentTextSize: contentTextSize,
      buttonTextSize: buttonTextSize,
      progress: progress,
      topImage: topImage,
      extraHeight: extraHeight,
      radius: radius,
      themeColor: themeColor,
      progressBackgroundColor: progressBackgroundColor,
      enableIgnore: enableIgnore,
      onIgnore: onIgnore,
      isForce: isForce,
      updateButtonText: updateButtonText ?? getBtnUpdateTxt(),
      ignoreButtonText: ignoreButtonText ?? getBtnIgnoreTxt(),
      onClose:onClose?? ()=> dismiss()
  );
}