CustomButton constructor

const CustomButton({
  1. Key? key,
  2. required String text,
  3. required VoidCallback? onPressed,
  4. Color? color,
  5. LinearGradient? gradient,
  6. Color textColor = Colors.white,
  7. double radius = 10.0,
  8. double elevation = 4.0,
  9. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 18, vertical: 14),
  10. IconData? icon,
  11. bool isLoading = false,
  12. bool showGlow = true,
  13. LinearGradient? borderGradient,
  14. 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);