Button constructor

const Button({
  1. Key? key,
  2. required String text,
  3. required VoidCallback? onPressed,
  4. ButtonType type = ButtonType.primary,
  5. ButtonSize size = ButtonSize.medium,
  6. IconData? icon,
  7. bool iconRight = false,
  8. Color? backgroundColor,
  9. Color? textColor,
  10. double? width,
  11. double? height,
  12. BorderRadius? borderRadius,
  13. EdgeInsetsGeometry? padding,
  14. bool isLoading = false,
  15. Widget? customChild,
})

Implementation

const Button({
  Key? key,
  required this.text,
  required this.onPressed,
  this.type = ButtonType.primary,
  this.size = ButtonSize.medium,
  this.icon,
  this.iconRight = false,
  this.backgroundColor,
  this.textColor,
  this.width,
  this.height,
  this.borderRadius,
  this.padding,
  this.isLoading = false,
  this.customChild,
}) : super(key: key);