FancyButton constructor

const FancyButton({
  1. Key? key,
  2. required String text,
  3. required VoidCallback onPressed,
  4. Gradient gradient = const LinearGradient(colors: [Colors.blue, Colors.purple]),
  5. double borderRadius = 12.0,
  6. IconData? icon,
  7. Color textColor = Colors.white,
  8. double elevation = 4.0,
  9. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
})

Implementation

const FancyButton({
  super.key,
  required this.text,
  required this.onPressed,
  this.gradient = const LinearGradient(colors: [Colors.blue, Colors.purple]),
  this.borderRadius = 12.0,
  this.icon,
  this.textColor = Colors.white,
  this.elevation = 4.0,
  this.padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
});