BASFButton constructor
const
BASFButton({
- Key? key,
- String? text,
- required VoidCallback? onPressed,
- required Color color,
- double? width = 48,
- bool expand = false,
- double? height = 48,
- EdgeInsets? padding,
- EdgeInsets? margin,
- IconData? leadingIcon,
- IconData? trailingIcon,
- IconData? iconOnly,
- bool negative = false,
Implementation
const BASFButton(
{Key? key,
this.text,
required this.onPressed,
required this.color,
this.width = 48,
this.expand = false,
this.height = 48,
this.padding,
this.margin,
this.leadingIcon,
this.trailingIcon,
this.iconOnly,
this.negative = false})
: assert(iconOnly != (text != null),
'You need a text or the iconOnly with true, but only one.'),
assert(
(leadingIcon == null && trailingIcon == null) ||
(((leadingIcon != null) || trailingIcon != null) &&
(text != null)),
'You need a text to use leading or trailing icon'),
assert(!((leadingIcon != null) && trailingIcon != null),
'You can not use both leading and trailing icon'),
super(key: key);