ExpressiveTextButton class

Material's text button (TextButton): the lowest emphasis, a label in primary on no container, at its size's padding.

Inheritance

Constructors

ExpressiveTextButton(String label, {VoidCallback? onPressed, ExpressiveComponentThemeData? style, bool busy = false, ExpressiveButtonSize size = ExpressiveButtonSize.small, ExpressiveButtonShape shape = ExpressiveButtonShape.round, IconData? icon, Widget? leading, IconData? trailingIcon, Widget? child, bool expand = false, String? semanticLabel, FocusNode? focusNode, bool autofocus = false, Key? key})
A text button.
const

Properties

autofocus → bool
Whether to take focus when first built.
finalinherited
busy → bool
Waiting on its own action: the label gives way to a loading indicator in the label's colour, the button keeps its size and its colours, and a press does nothing. It keeps its focus, and a screen reader hears its label and that it is loading. (Compose has no busy button; M3 Expressive's loading indicator is its wait under five seconds.)
finalinherited
child → Widget?
The label as a widget, in place of label's text (Compose's content slot): it inherits the size's text style and the content colour. label stays the button's name for assistive technology.
finalinherited
expand → bool
Fill the available width (a sticky bottom action).
finalinherited
focusNode → FocusNode?
The focus node; one is made when null.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
A leading icon (one of ExpressiveSymbols).
finalinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
kind → ExpressiveButtonKind
The Material style the button paints.
finalinherited
label → String
The label: an action's meaning, wrapping to two lines before it ellipsizes.
finalinherited
leading → Widget?
A widget before the label, for the one thing an icon cannot say.
finalinherited
onPressed → VoidCallback?
What a tap does; the button is disabled when null.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String?
What a screen reader says instead of label.
finalinherited
shape → ExpressiveButtonShape
Round or square at rest.
finalinherited
size → ExpressiveButtonSize
The size: its height, padding, icon, type and pressed shape.
finalinherited
style → ExpressiveComponentThemeData?
Stateful visual overrides before the component theme.
finalinherited
trailingIcon → IconData?
A trailing icon.
finalinherited

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
inherited
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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