ButtonProps class abstract final

ElevatedButton, FilledButton, TextButton, OutlinedButton: a label with an optional icon (their .icon constructors), styled by a ButtonStyle.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Constants

all → const List<PropDef<Object?>>
autofocus → const PropDef<bool>
Takes keyboard focus when it appears (Flutter's autofocus): Enter or Space presses it.
drawnStates → const List<String>
The states a button's own look draws (Flutter's ButtonStyle resolved per WidgetState): hover and press overlays, a focus ring, 50 % opacity disabled, and selected (a bound "selected", as Flutter's statesController): a tinted fill with the primary colour as ink, for buttons used as tabs or toggles.
elevated → const WidgetSpec
enabled → const PropDef<bool>
False is a disabled button (onPressed: null).
filled → const WidgetSpec
icon → const PropDef<IconGlyph>
The icon beside the label; empty for none.
iconAlignment → const PropDef<IconAlignment>
label → const PropDef<String>
The button's text (not text). Its colour, size and weight are in style.
loading → const PropDef<bool>
Busy (SSUI's isLoading; no Flutter counterpart): a spinner in place of the icon, taps ignored, drawn as disabled, announced as busy. Bind it to the state an action sets while it runs.
outlined → const WidgetSpec
spacing → const PropDef<double>
Space between the icon and the label.
style → const PropDef<ButtonStyle>
The button's look (Flutter's ButtonStyle): backgroundColor, foregroundColor (the label and icon), textStyle, shape, side, padding. A button's colours are here, not in decoration.
text → const WidgetSpec
textAlign → const PropDef<TextAlign>
tonal → const PropDef<bool>
FilledButton.tonal.