GrxButton constructor

const GrxButton({
  1. Key? key,
  2. required Color foregroundColor,
  3. String? text,
  4. InlineSpan? textSpan,
  5. GrxTextTransform transform = GrxTextTransform.none,
  6. Color? backgroundColor,
  7. void onPressed()?,
  8. EdgeInsets? margin,
  9. MainAxisSize mainAxisSize = MainAxisSize.max,
  10. IconData? icon,
  11. GrxAlign iconAlign = GrxAlign.left,
  12. double iconSize = 20.0,
  13. Color? iconColor,
  14. double iconPadding = GrxSpacing.xs,
  15. GrxShape shape = GrxShape.rounded,
  16. EdgeInsets padding = const EdgeInsets.symmetric(vertical: 12.0, horizontal: 20.0),
  17. TextStyle? style,
  18. Color? borderColor,
  19. TextStyle? textStyle,
  20. bool isLoading = false,
  21. 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);