WarcraftButton class

Warcraft-themed button with frame variants and press animation.

Inheritance

Constructors

WarcraftButton({Key? key, required Widget child, VoidCallback? onPressed, WarcraftButtonVariant variant = WarcraftButtonVariant.defaultVariant, WarcraftButtonSize size = WarcraftButtonSize.md, EdgeInsetsGeometry? padding, double maxWidth = 220, FocusNode? focusNode, bool autofocus = false, String? semanticLabel, bool selected = false, bool isLoading = false, String? loadingLabel})
Creates a WarcraftButton.
const

Properties

autofocus bool
Whether this button should claim keyboard focus when first shown.
final
child Widget
Content displayed inside the button.
final
enabled bool
Whether the button responds to input; true when onPressed is set.
no setter
focusNode FocusNode?
Optional focus node used for keyboard focus and activation.
final
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
Whether to replace child with a progress indicator and block input.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingLabel String?
Optional text shown beside the progress indicator and announced while isLoading is true.
final
maxWidth double
Maximum width the button is constrained to.
final
onPressed VoidCallback?
Called when the button is tapped or activated via keyboard (Enter or Space); the button is treated as disabled when this is null.
final
padding EdgeInsetsGeometry?
Custom content padding; overrides the default padding for size when set.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool
Whether assistive technology should announce this button as selected.
final
semanticLabel String?
Optional accessible label when child does not contain useful text.
final
size WarcraftButtonSize
Size preset controlling padding and text/icon scale.
final
variant WarcraftButtonVariant
Visual style to render the button with.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<WarcraftButton>
Creates the mutable state for this widget at a given location in the tree.
override
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