Button.icon constructor
Button.icon({
- Key? key,
- required Widget icon,
- ButtonThemeData? style,
- IconThemeButtonStateBuilder? iconTheme,
- VoidCallback? onPressed,
- VoidCallback? onLongPress,
- String? semanticLabel,
- FocusNode? focusNode,
- bool autofocus = false,
Creates a button with an icon. Uses IconButton under the hood
Implementation
Button.icon({
Key? key,
required Widget icon,
ButtonThemeData? style,
IconThemeButtonStateBuilder? iconTheme,
this.onPressed,
this.onLongPress,
this.semanticLabel,
this.focusNode,
this.autofocus = false,
}) : child = IconButton(
icon: icon,
onPressed: onPressed,
onLongPress: onLongPress,
semanticLabel: semanticLabel,
style: style,
iconTheme: iconTheme,
focusNode: focusNode,
),
style = null,
type = _ButtonType.icon,
builder = null,
super(key: key);