Button constructor
const
Button({
- Key? key,
- required String text,
- required VoidCallback? onPressed,
- ButtonType type = ButtonType.primary,
- ButtonSize size = ButtonSize.medium,
- IconData? icon,
- bool iconRight = false,
- Color? backgroundColor,
- Color? textColor,
- double? width,
- double? height,
- BorderRadius? borderRadius,
- EdgeInsetsGeometry? padding,
- bool isLoading = false,
- 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);