Button constructor

const Button({
  1. Key? key,
  2. required String text,
  3. required VoidCallback onPressed,
  4. IconData? icon,
  5. double iconSize = 24,
  6. bool iconAfter = true,
  7. TextStyle? textStyle,
  8. Color? iconColor,
  9. Color? backgroundColor,
  10. double spacing = 8,
})

Implementation

const Button({
  super.key,
  required this.text,
  required this.onPressed,
  this.icon,
  this.iconSize = 24,
  this.iconAfter = true,
  this.textStyle,
  this.iconColor,
  this.backgroundColor,
  this.spacing = 8,
});