UIProButton constructor

const UIProButton({
  1. Key? key,
  2. required String text,
  3. bool isLoading = false,
  4. VoidCallback? onPressed,
  5. Color? backgroundColor,
  6. Color? textColor,
  7. Color? disabledBackgroundColor,
  8. Color? disabledTextColor,
  9. double? borderRadius,
  10. double? height,
  11. double? width,
  12. bool fullWidth = true,
  13. EdgeInsets? padding,
  14. double? elevation,
  15. TextStyle? textStyle,
  16. Widget? leading,
  17. Widget? trailing,
  18. double loadingIndicatorSize = 20,
  19. Color? loadingIndicatorColor,
  20. double loadingIndicatorStrokeWidth = 2.5,
  21. Widget? loadingWidget,
  22. BorderSide? borderSide,
  23. UIProButtonVariant variant = UIProButtonVariant.filled,
  24. bool animateStateChanges = true,
  25. Color? splashColor,
})

Creates a loading-aware button.

Implementation

const UIProButton({
  super.key,
  required this.text,
  this.isLoading = false,
  this.onPressed,
  this.backgroundColor,
  this.textColor,
  this.disabledBackgroundColor,
  this.disabledTextColor,
  this.borderRadius,
  this.height,
  this.width,
  this.fullWidth = true,
  this.padding,
  this.elevation,
  this.textStyle,
  this.leading,
  this.trailing,
  this.loadingIndicatorSize = 20,
  this.loadingIndicatorColor,
  this.loadingIndicatorStrokeWidth = 2.5,
  this.loadingWidget,
  this.borderSide,
  this.variant = UIProButtonVariant.filled,
  this.animateStateChanges = true,
  this.splashColor,
});