Button constructor
const
Button({
- Key? key,
- Widget? child,
- ButtonStateWidgetBuilder? builder,
- ButtonThemeData? style,
- VoidCallback? onPressed,
- VoidCallback? onLongPress,
- String? semanticLabel,
- FocusNode? focusNode,
- bool autofocus = false,
Creates a fluent-styled button.
You can't provide both child and builder, but you must provide at least one of them.
Implementation
const Button({
Key? key,
this.child,
this.builder,
this.style,
this.onPressed,
this.onLongPress,
this.semanticLabel,
this.focusNode,
this.autofocus = false,
}) : assert(
child != null || builder != null,
'You can NOT provide both child and builder',
),
type = _ButtonType.def,
super(key: key);