BetterButton constructor
BetterButton({
- Key? key,
- BetterButtonType? type = BetterButtonType.defaultType,
- VoidCallback? onClick,
- Color? backgroundColor,
- Color? borderColor,
- Color? overlayColor,
- BorderRadiusGeometry? borderRadius,
- bool loading = false,
- double? loadingSize,
- double? loadingStrokeWidth,
- Widget? loadingWidget,
- Color? loadingColor,
- double? loadingMarginRight,
- Widget? prefix,
- Widget? suffix,
- double? width,
- double? height,
- BetterButtonLoadingType loadingType = BetterButtonLoadingType.circular,
- String? text,
- TextStyle? textStyle,
- EdgeInsetsGeometry? padding,
- bool? plain = false,
- Gradient? gradient,
- bool? disableSplash = false,
- bool? disabled = false,
- bool? hideContentWhenLoading = true,
- String? loadingText,
- Widget? child,
- double? borderWidth,
- 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,
});