FButton constructor

const FButton({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. FColorI? enabledColor,
  4. FColorI? disabledColor,
  5. FColorI? hoveredColor,
  6. FColorI? pressedColor,
  7. FColorI? enabledIconColor,
  8. FColorI? hoveredIconColor,
  9. FColorI? disabledIconColor,
  10. FColorI? pressedIconColor,
  11. FColorI? enabledTextColor,
  12. FColorI? hoveredTextColor,
  13. FColorI? disabledTextColor,
  14. FColorI? pressedTextColor,
  15. FIconType? icon,
  16. String? buttonText,
  17. FTypographyType fTextTypographyType = FTypographyType.bodyLarge,
  18. double? width,
  19. double height = 40,
  20. BorderRadius? borderRadius,
  21. List<BoxShadow>? enabledBoxShadows,
  22. List<BoxShadow>? hoveredBoxShadows,
  23. List<BoxShadow>? disabledBoxShadows,
  24. List<BoxShadow>? pressedBoxShadows,
  25. double? spacingBetweenIconAndText,
  26. EdgeInsets? padding,
  27. BoxFit? boxFit,
  28. TextOverflow textOverflow = TextOverflow.ellipsis,
  29. required FButtonType buttonType,
})

Implementation

const FButton({
  Key? key,
  this.onPressed,
  this.enabledColor,
  this.disabledColor,
  this.hoveredColor,
  this.pressedColor,
  this.enabledIconColor,
  this.hoveredIconColor,
  this.disabledIconColor,
  this.pressedIconColor,
  this.enabledTextColor,
  this.hoveredTextColor,
  this.disabledTextColor,
  this.pressedTextColor,
  this.icon,
  this.buttonText,
  this.fTextTypographyType = FTypographyType.bodyLarge,
  this.width,
  this.height = 40,
  this.borderRadius,
  this.enabledBoxShadows,
  this.hoveredBoxShadows,
  this.disabledBoxShadows,
  this.pressedBoxShadows,
  this.spacingBetweenIconAndText,
  this.padding,
  this.boxFit,
  this.textOverflow = TextOverflow.ellipsis,
  required this.buttonType,
})  : assert(icon != null || buttonText != null,
          'Debe proporcionar al menos un icono o un texto.'),
      super(key: key);