BetterButton constructor

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

创建一个 BetterButton

Implementation

BetterButton({
  super.key,
  this.type = BetterButtonType.defaultType,
  this.onClick,
  this.backgroundColor,
  this.borderColor,
  this.overlayColor,
  this.borderRadius,
  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.gradient,
  this.disableSplash = false,
  this.disabled = false,
  this.hideContentWhenLoading = true,
  this.loadingText,
  this.child,
  this.borderWidth,
  this.isShowBorder = true,
});