CustomButton constructor
const
CustomButton({
- Key? key,
- required String text,
- required VoidCallback onPressed,
- ButtonType type = ButtonType.primary,
- IconData? icon,
- double? width,
- double height = 48.0,
- double borderRadius = 8.0,
- Color? backgroundColor,
- Color? textColor,
- Color? iconColor,
- bool isLoading = false,
- bool isDisabled = false,
- EdgeInsetsGeometry? padding,
- double fontSize = 16.0,
- FontWeight fontWeight = FontWeight.w600,
Implementation
const CustomButton({
Key? key,
required this.text,
required this.onPressed,
this.type = ButtonType.primary,
this.icon,
this.width,
this.height = 48.0,
this.borderRadius = 8.0,
this.backgroundColor,
this.textColor,
this.iconColor,
this.isLoading = false,
this.isDisabled = false,
this.padding,
this.fontSize = 16.0,
this.fontWeight = FontWeight.w600,
}) : super(key: key);