Button class

Undocumented public member.

Inheritance
Implemented types

Constructors

Button({Key? key, required String text, required void onPressed(), bool focused = false, Style style = Style.empty, Style focusedStyle = const Style(modifiers: Modifier.reverse)})
Creates a new Button.

Properties

focused bool
Whether this button currently has keyboard focus.
final
focusedStyle Style
The rendering style applied when the button is focused.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
The optional key for this widget.
finalinherited
onPressed → void Function()
The callback executed when the button is activated.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style Style
The normal rendering style.
final
text String
The text label displayed on the button.
final

Methods

createElement() Element
Creates an Element to manage this widget's location in the tree.
inherited
createState() State<Button>
Creates the mutable state for this widget at a given location in the tree.
override
getIntrinsicHeight(int width) int
Computes the intrinsic height of this widget under the given width constraint.
inherited
getIntrinsicWidth(int height) int
Computes the intrinsic width of this widget under the given height constraint.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited