icon static method
SingleChildModifier
icon({
- Key? key,
- Key? modifierKey,
- required VoidCallback? onPressed,
- VoidCallback? onLongPress,
- ValueChanged<
bool> ? onHover, - ValueChanged<
bool> ? onFocusChange, - ButtonStyle? style,
- FocusNode? focusNode,
- bool? autofocus,
- Clip? clipBehavior,
- required Widget icon,
- required Widget label,
Create a text button from a pair of widgets that serve as the button's
icon
and label
.
The icon and label are arranged in a row and padded by 8 logical pixels at the ends, with an 8 pixel gap in between.
The icon
and label
arguments must not be null.
Implementation
static SingleChildModifier icon({
Key? key,
Key? modifierKey,
required VoidCallback? onPressed,
VoidCallback? onLongPress,
ValueChanged<bool>? onHover,
ValueChanged<bool>? onFocusChange,
ButtonStyle? style,
FocusNode? focusNode,
bool? autofocus,
Clip? clipBehavior,
required Widget icon,
required Widget label,
}) =>
_TextButtonWithIcon(
key: key,
modifierKey: modifierKey,
focusNode: focusNode,
onFocusChange: onFocusChange,
onHover: onHover,
onLongPress: onLongPress,
style: style,
icon: icon,
label: label,
onPressed: onPressed,
autofocus: autofocus,
clipBehavior: clipBehavior,
);