FlutstrapButton constructor
const
FlutstrapButton({
- Key? key,
- VoidCallback? onPressed,
- VoidCallback? onLongPress,
- ButtonStyle? style,
- FocusNode? focusNode,
- bool autofocus = false,
- Clip clipBehavior = Clip.none,
- FSButtonVariant variant = FSButtonVariant.primary,
- FSButtonSize size = FSButtonSize.md,
- bool disabled = false,
- bool loading = false,
- Widget? child,
- String? text,
- Widget? leading,
- Widget? trailing,
- bool expanded = false,
Main constructor for FlutstrapButton
Implementation
const FlutstrapButton({
super.key,
this.onPressed,
this.onLongPress,
this.style,
this.focusNode,
this.autofocus = false,
this.clipBehavior = Clip.none,
this.variant = FSButtonVariant.primary,
this.size = FSButtonSize.md,
this.disabled = false,
this.loading = false,
this.child,
this.text,
this.leading,
this.trailing,
this.expanded = false,
}) : assert(child != null || text != null,
'Either child or text must be provided'),
super();