CustomButton constructor
const
CustomButton({
- Key? key,
- required String text,
- required VoidCallback? onPressed,
- bool isLoading = false,
- Color? backgroundColor,
- Color? textColor,
- Color? disabledBackgroundColor,
- Color? loadingIndicatorColor,
- double? width,
- double height = 50,
- double borderRadius = 10,
- double fontSize = 18,
- FontWeight? fontWeight,
- EdgeInsetsGeometry? padding,
- Widget? prefixIcon,
- Widget? suffixIcon,
Implementation
const CustomButton({
Key? key,
required this.text,
required this.onPressed,
this.isLoading = false,
this.backgroundColor,
this.textColor,
this.disabledBackgroundColor,
this.loadingIndicatorColor,
this.width,
this.height = 50,
this.borderRadius = 10,
this.fontSize = 18,
this.fontWeight,
this.padding,
this.prefixIcon,
this.suffixIcon,
}) : super(key: key);