HButton
Class
Inheritance
objectDiagnosticable BaseDiagnosticable Tree BaseWidgetStatefulWidget <H Button>SingleChildStatefulWidget <H Button>Implements
I Diagnosticable TreeI DiagnosticableI Widget List CandidateI Stateful WidgetIEnumerable <Widget>I EnumerableFields
controller: Button Controller
enabled: bool
focusKey: Key
onClick: Action
palette: Color Token Palette
radius: Nullable <H Input Radius>
selected: bool
size: Nullable <H Button Size>
style: H Button Style
variant: Nullable <H Button Variant>
Constructors
HButton(variant: Nullable <H Button Variant>, controller: Button Controller, focusKey: Key, enabled: bool, selected: bool, onClick: Action, style: H Button Style, radius: Nullable <H Input Radius>, size: Nullable <H Button Size>, palette: Color Token Palette, child: Widget, key: Key, constants: object[], modifiers: IReadOnlyCollection <Modifier>)
Creates a highly customizable button with various styling, size, and behavioral options.
Parameters
variant:
Nullable <H Button Variant> - The preset button variant that is used to generate the button's visual style.
If not specified, the current PrimitiveTheme.Button theme will be used.controller:
Button Controller - The controller used to manage the button's WidgetState and button behavior.
If not specified, a controller will be created and managed by the button's state.focusKey:
Key - The key that will be used by the interactive element of the button. Can be used for focus management using
GlobalKey.enabled:
bool - Sets WidgetState.Disabled if no controller is specified.selected:
bool - Sets WidgetState.Selected if no controller is specified.onClick:
Action - Sets the ButtonController.onClick action if no controller is specified.style:
H Button Style - A predefined button style to change the visual appearance of the button.
If specified, the variant and PrimitiveTheme.Button theme will be ignored.radius:
Nullable <H Input Radius> - The radius preset used to generate the button's variant style.size:
Nullable <H Button Size> - The size preset used to generate the button's variant style.palette:
Color Token Palette - The primary palette used to generate the button's variant style.child:
Widget - A widget that will be rendered inside the button.key:
Key - Passed on to Widget.key.constants:
object[] - Passed on to Widget.constants.modifiers:
IReadOnlyCollection <Modifier> - Passed on to Widget.modifiers.Methods
DebugFillProperties(properties: Diagnostic Properties Builder): void
Inherited Members
Extension Methods
To Diagnostics Node SafeIfClipConstDisplayExpandFillFlexibleMarginOpacityPaddingPositionedShrinkSizeStretchTight StretchTightVisibilityWith ModifierTo BuildableTo FactorySpreadDescribe IdentityShort HashTo String Nullable