BetterButton constructor

BetterButton({
  1. Key? key,
  2. BetterButtonType? type = BetterButtonType.defaultType,
  3. BoxDecoration? decoration,
  4. VoidCallback? onTap,
  5. VoidCallback? onLongPress,
  6. Color? overlayColor,
  7. EdgeInsetsGeometry? margin,
  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. bool? disableSplash = false,
  24. bool? disabled = false,
  25. bool? hideContentWhenLoading = true,
  26. String? loadingText,
  27. Widget? child,
  28. WrapAlignment runAlignment = WrapAlignment.center,
  29. WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.center,
  30. WrapAlignment alignment = WrapAlignment.center,
})

创建一个 BetterButton

Implementation

BetterButton({
  super.key,
  this.type = BetterButtonType.defaultType,
  this.decoration,
  this.onTap,
  this.onLongPress,
  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,
});