GradientButton constructor

const GradientButton({
  1. Key? key,
  2. required String text,
  3. required List<Color> colors,
  4. required VoidCallback onPressed,
  5. double borderRadius = 8.0,
  6. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
  7. TextStyle? textStyle,
  8. Alignment beginAlignment = Alignment.topLeft,
  9. Alignment endAlignment = Alignment.bottomRight,
})

Implementation

const GradientButton({
  super.key,
  required this.text,
  required this.colors,
  required this.onPressed,
  this.borderRadius = 8.0,
  this.padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
  this.textStyle,
  this.beginAlignment = Alignment.topLeft,
  this.endAlignment = Alignment.bottomRight,
});