FxButton constructor

const FxButton({
  1. required VoidCallback onPressed,
  2. Key? key,
  3. String? text,
  4. IconData? icon,
  5. Color? color,
  6. Color? outlineColor,
  7. BtnShape shape = BtnShape.rounded,
  8. BtnSize size = BtnSize.normal,
  9. BtnType type = BtnType.solid,
  10. bool isBlock = false,
  11. IconData? prefixIcon,
  12. IconData? suffixIcon,
  13. EdgeInsetsGeometry? padding,
  14. EdgeInsetsGeometry? margin,
  15. BorderRadius? radius,
  16. List<BoxShadow>? shadow,
  17. Color? textColor,
  18. Color? iconColor,
  19. bool isSplashColor = false,
  20. MainAxisAlignment? mainAxisAlignment,
  21. double? iconSize,
  22. TextStyle? textStyle,
  23. Widget? child,
  24. bool isLoading = false,
  25. Widget? loadingWidget,
  26. double? loadingSize,
  27. 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');