CustomButton constructor
const
CustomButton({
- Key? key,
- required String text,
- required VoidCallback? onPressed,
- Color? color,
- LinearGradient? gradient,
- Color textColor = Colors.white,
- double radius = 10.0,
- double elevation = 4.0,
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 18, vertical: 14),
- IconData? icon,
- bool isLoading = false,
- bool showGlow = true,
- LinearGradient? borderGradient,
- double borderWidth = 2.0,
Implementation
const CustomButton({
Key? key,
required this.text,
required this.onPressed,
this.color,
this.gradient,
this.textColor = Colors.white,
this.radius = 10.0,
this.elevation = 4.0,
this.padding = const EdgeInsets.symmetric(horizontal: 18, vertical: 14),
this.icon,
this.isLoading = false,
this.showGlow = true,
this.borderGradient,
this.borderWidth = 2.0,
}) : super(key: key);