HoverButton class

Base widget for any widget that requires input.

Inheritance
Available Extensions

Constructors

HoverButton({Key? key, required ButtonStateWidgetBuilder builder, MouseCursor? cursor, VoidCallback? onPressed, VoidCallback? onLongPress, FocusNode? focusNode, EdgeInsetsGeometry? margin, String? semanticLabel, VoidCallback? onTapDown, VoidCallback? onTapUp, VoidCallback? onTapCancel, VoidCallback? onLongPressEnd, VoidCallback? onLongPressStart, GestureDragStartCallback? onHorizontalDragStart, GestureDragUpdateCallback? onHorizontalDragUpdate, GestureDragEndCallback? onHorizontalDragEnd, Map<Type, GestureRecognizerFactory<GestureRecognizer>> gestures = const {}, VoidCallback? onFocusTap, ValueChanged<bool>? onFocusChange, bool autofocus = false, bool actionsEnabled = true, Map<Type, Action<Intent>>? customActions, Map<ShortcutActivator, Intent>? shortcuts, bool focusEnabled = true, bool forceEnabled = false, HitTestBehavior hitTestBehavior = HitTestBehavior.opaque})
Creates a hover button.
const

Properties

actionsEnabled bool
Whether actions are enabled
final
autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
builder ButtonStateWidgetBuilder
final
cursor MouseCursor?
The cursor for a mouse pointer when it enters or is hovering over the widget.
final
customActions Map<Type, Action<Intent>>?
Custom actions that will be executed around the subtree of this widget.
final
focusEnabled bool
Whether the focusing is enabled.
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
final
forceEnabled bool
Whether the hover button should be always enabled.
final
gestures Map<Type, GestureRecognizerFactory<GestureRecognizer>>
The gestures that this widget will attempt to recognize.
final
hashCode int
The hash code for this object.
no setterinherited
hitTestBehavior HitTestBehavior
How this gesture detector should behave during hit testing.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
The margin created around this button. The margin is added around the Semantics widget, if any.
final
onFocusChange ValueChanged<bool>?
final
onFocusTap VoidCallback?
When the button is focused and is actioned, with either the enter or space keys
final
onHorizontalDragEnd GestureDragEndCallback?
final
onHorizontalDragStart GestureDragStartCallback?
final
onHorizontalDragUpdate GestureDragUpdateCallback?
final
onLongPress VoidCallback?
final
onLongPressEnd VoidCallback?
final
onLongPressStart VoidCallback?
final
onPressed VoidCallback?
final
onTapCancel VoidCallback?
final
onTapDown VoidCallback?
final
onTapUp VoidCallback?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Semantic label for the input.
final
shortcuts Map<ShortcutActivator, Intent>?
The map of shortcuts that describes the mapping between a key sequence defined by a ShortcutActivator and the Intent that will be emitted when that key sequence is pressed.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<HoverButton>
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}) 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

Static Methods

maybeOf(BuildContext context) → _HoverButtonInherited?
of(BuildContext context) → _HoverButtonInherited