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? textColor,
  8. IconData? icon,
  9. double? iconSize,
  10. Color? iconColor,
  11. ValueNotifier<BoxShadow>? shadow,
  12. double margin = 0.0,
})

Creates a RoundedButton widget.

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.textColor,
    this.icon,
    this.iconSize,
    this.iconColor,
    this.shadow,
    this.margin = 0.0})
    : assert(text != "" || icon != null);