BetterButton constructor

BetterButton({
  1. Key? key,
  2. BetterButtonType? type = BetterButtonType.defaultType,
  3. BoxDecoration? decoration,
  4. VoidCallback? onClick,
  5. Color? overlayColor,
  6. EdgeInsetsGeometry? margin,
  7. bool loading = false,
  8. double? loadingSize,
  9. double? loadingStrokeWidth,
  10. Widget? loadingWidget,
  11. Color? loadingColor,
  12. double? loadingMarginRight,
  13. Widget? prefix,
  14. Widget? suffix,
  15. double? width,
  16. double? height,
  17. BetterButtonLoadingType loadingType = BetterButtonLoadingType.circular,
  18. String? text,
  19. TextStyle? textStyle,
  20. EdgeInsetsGeometry? padding,
  21. bool? plain = false,
  22. bool? disableSplash = false,
  23. bool? disabled = false,
  24. bool? hideContentWhenLoading = true,
  25. String? loadingText,
  26. Widget? child,
  27. WrapAlignment runAlignment = WrapAlignment.center,
  28. WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.center,
  29. WrapAlignment alignment = WrapAlignment.center,
})

创建一个 BetterButton

Implementation

BetterButton({
  super.key,
  this.type = BetterButtonType.defaultType,
  this.decoration,
  this.onClick,
  this.overlayColor,
  this.margin,
  this.loading = false,
  this.loadingSize,
  this.loadingStrokeWidth,
  this.loadingWidget,
  this.loadingColor,
  this.loadingMarginRight,
  this.prefix,
  this.suffix,
  this.width,
  this.height,
  this.loadingType = BetterButtonLoadingType.circular,
  this.text,
  this.textStyle,
  this.padding,
  this.plain = false,
  this.disableSplash = false,
  this.disabled = false,
  this.hideContentWhenLoading = true,
  this.loadingText,
  this.child,
  this.runAlignment = WrapAlignment.center,
  this.crossAxisAlignment = WrapCrossAlignment.center,
  this.alignment = WrapAlignment.center,
});