RoundedButton constructor

const RoundedButton({
  1. Key? key,
  2. String text = "",
  3. required Function onPressed,
  4. double? width,
  5. double? height,
  6. Color? color,
  7. Color? borderColor,
  8. double? borderWidth,
  9. Color? textColor,
  10. IconData? icon,
  11. double? iconSize,
  12. Color? iconColor,
  13. ValueNotifier<BoxShadow>? shadow,
  14. double margin = 0.0,
  15. double radius = 24,
  16. bool isDisabled = false,
})

A customizable rounded button widget with optional icon and shadow.

The onPressed parameter must not be null. The text parameter must not be empty if icon is null.

Implementation

const RoundedButton({
  super.key,
  this.text = "",
  required this.onPressed,
  this.width,
  this.height,
  this.color,
  this.borderColor,
  this.borderWidth,
  this.textColor,
  this.icon,
  this.iconSize,
  this.iconColor,
  this.shadow,
  this.margin = 0.0,
  this.radius = 24,
  this.isDisabled = false,
});