UpdateWidget constructor

const UpdateWidget({
  1. Key? key,
  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 = 0.0,
  10. double? totalProgress = 0.0,
  11. Color progressBackgroundColor = const Color(0xFFFFCDD2),
  12. Widget? topImage,
  13. Widget? closeImage,
  14. double extraHeight = 5.0,
  15. double radius = 4.0,
  16. Color themeColor = Colors.red,
  17. bool enableIgnore = false,
  18. VoidCallback? onIgnore,
  19. bool isForce = false,
  20. String updateButtonText = '更新',
  21. String ignoreButtonText = '忽略此版本',
  22. VoidCallback? onClose,
})

Implementation

const UpdateWidget(
     {Key? key,
       this.width = 0.0,
       required this.title,
       required this.updateContent,
       required this.onUpdate,
       this.titleTextSize = 16.0,
       this.contentTextSize = 14.0,
       this.buttonTextSize = 14.0,
       this.progress = 0.0,
       this.totalProgress = 0.0,
       this.progressBackgroundColor = const Color(0xFFFFCDD2),
       this.topImage,
       this.closeImage,
       this.extraHeight = 5.0,
       this.radius = 4.0,
       this.themeColor = Colors.red,
       this.enableIgnore = false,
       this.onIgnore,
       this.isForce = false,
       this.updateButtonText = '更新',
       this.ignoreButtonText = '忽略此版本',
       this.onClose
     })
     : super(key: key);