GrxButton constructor
const
GrxButton({
- Key? key,
- required Color foregroundColor,
- String? text,
- InlineSpan? textSpan,
- GrxTextTransform transform = GrxTextTransform.none,
- Color? backgroundColor,
- void onPressed()?,
- EdgeInsets? margin,
- MainAxisSize mainAxisSize = MainAxisSize.max,
- IconData? icon,
- GrxAlign iconAlign = GrxAlign.left,
- double iconSize = 20.0,
- Color? iconColor,
- double iconPadding = GrxSpacing.xs,
- GrxShape shape = GrxShape.rounded,
- EdgeInsets padding = const EdgeInsets.symmetric(vertical: 12.0, horizontal: 20.0),
- TextStyle? style,
- Color? borderColor,
- TextStyle? textStyle,
- bool isLoading = false,
- bool enabled = true,
Implementation
const GrxButton({
super.key,
required this.foregroundColor,
this.text,
this.textSpan,
this.transform = GrxTextTransform.none,
this.backgroundColor,
this.onPressed,
this.margin,
this.mainAxisSize = MainAxisSize.max,
this.icon,
this.iconAlign = GrxAlign.left,
this.iconSize = 20.0,
this.iconColor,
this.iconPadding = GrxSpacing.xs,
this.shape = GrxShape.rounded,
this.padding = const EdgeInsets.symmetric(vertical: 12.0, horizontal: 20.0),
this.style,
this.borderColor,
this.textStyle,
this.isLoading = false,
this.enabled = true,
}) : assert(text != null || textSpan != null);