FxButton constructor
const
FxButton({
- required VoidCallback onPressed,
- Key? key,
- String? text,
- IconData? icon,
- Color? color,
- Color? outlineColor,
- BtnShape shape = BtnShape.rounded,
- BtnSize size = BtnSize.normal,
- BtnType type = BtnType.solid,
- bool isBlock = false,
- IconData? prefixIcon,
- IconData? suffixIcon,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- BorderRadius? radius,
- List<
BoxShadow> ? shadow, - Color? textColor,
- Color? iconColor,
- bool isSplashColor = false,
- MainAxisAlignment? mainAxisAlignment,
- double? iconSize,
- TextStyle? textStyle,
- Widget? child,
- bool isLoading = false,
- Widget? loadingWidget,
- double? loadingSize,
- Color? loadingColor,
constructor
Implementation
const FxButton({
required this.onPressed,
super.key,
this.text,
this.icon,
this.color,
this.outlineColor,
this.shape = BtnShape.rounded,
this.size = BtnSize.normal,
this.type = BtnType.solid,
this.isBlock = false,
this.prefixIcon,
this.suffixIcon,
this.padding,
this.margin,
this.radius,
this.shadow,
this.textColor,
this.iconColor,
this.isSplashColor = false,
this.mainAxisAlignment,
this.iconSize,
this.textStyle,
this.child,
this.isLoading = false,
this.loadingWidget,
this.loadingSize,
this.loadingColor,
}) : assert(icon != null || text != null || child != null || isLoading,
'Either icon, text, child must be provided, or isLoading must be true');