BetterButton constructor
BetterButton({
- Key? key,
- BetterButtonType? type = BetterButtonType.defaultType,
- BoxDecoration? decoration,
- VoidCallback? onClick,
- Color? overlayColor,
- EdgeInsetsGeometry? margin,
- 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,
- bool? disableSplash = false,
- bool? disabled = false,
- bool? hideContentWhenLoading = true,
- String? loadingText,
- Widget? child,
- WrapAlignment runAlignment = WrapAlignment.center,
- WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.center,
- 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,
});