FButton constructor
FButton({
- required VoidCallback? onPress,
- required Widget label,
- FButtonStyle style = Variant.primary,
- VoidCallback? onLongPress,
- bool autofocus = false,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - Widget? prefix,
- Widget? suffix,
- Key? key,
Creates a FButton that contains a prefix
, label
, and suffix
.
The button layout is as follows, assuming the locale is read from left to right:
|---------------------------------------|
| [prefixIcon] [label] [suffixIcon] |
|---------------------------------------|
FButtonIcon provides a convenient way to transform a bundled SVG icon into a prefix
and suffix
.
Implementation
FButton({
required this.onPress,
required Widget label,
this.style = Variant.primary,
this.onLongPress,
this.autofocus = false,
this.focusNode,
this.onFocusChange,
Widget? prefix,
Widget? suffix,
super.key,
}) : child = Content(
prefix: prefix,
suffix: suffix,
label: label,
);