Anchor class

An area that responds to touch. Has a configurable shape and can be configured to clip overlay that extend outside its bounds or not.

Inheritance

Constructors

Anchor({Key? key, Curve? curve, Duration? duration, VoidCallback? onTap, GestureTapUpCallback? onTapUp, GestureTapDownCallback? onTapDown, VoidCallback? onTapCancel, VoidCallback? onDoubleTap, VoidCallback? onLongPress, ValueChanged<bool>? onHover, ValueChanged<bool>? onFocus, bool? overlayDisabled, Color? overlayColor, double? overlayOpacity, MouseCursor? mouseCursor, BorderRadius? borderRadius, double? radius, BoxShape? shape, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, AnchorStyle? style, WidgetEventController? eventsController, FocusNode? focusNode, bool autofocus = false, bool canRequestFocus = true, bool disabled = false, Widget? child})
Creates an area that responds to touch.
const
Anchor.circle({Key? key, Curve? curve, Duration? duration, VoidCallback? onTap, GestureTapUpCallback? onTapUp, GestureTapDownCallback? onTapDown, VoidCallback? onTapCancel, VoidCallback? onDoubleTap, VoidCallback? onLongPress, ValueChanged<bool>? onHover, ValueChanged<bool>? onFocus, bool? overlayDisabled, Color? overlayColor, double? overlayOpacity, MouseCursor? mouseCursor, double? radius, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, AnchorStyle? style, WidgetEventController? eventsController, FocusNode? focusNode, bool autofocus = false, bool canRequestFocus = true, bool disabled = false, Widget? child})
Creates a circle shaped area that responds to touch.
const

Properties

autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
borderRadius BorderRadius?
The clipping radius of the containing rect. This is effective only if the shape is BoxShape.circle.
final
canRequestFocus bool
If true, this widget may request the primary focus.
final
child Widget?
The widget below this widget in the tree.
final
curve Curve?
The curve to apply when animating the parameters of this widget.
final
disabled bool
Whether or not this widget is disabled for interaction.
final
duration Duration?
The duration over which to animate the parameters of this widget.
final
effectiveStyle AnchorStyle
no setter
eventsController WidgetEventController?
Used by widgets that expose their internal event for the sake of extensions that add support for additional events.
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
Empty space to surround the outside anchor.
final
mouseCursor MouseCursor?
The cursor for a mouse pointer when it enters or is hovering over the widget.
final
onDoubleTap VoidCallback?
Called when the user double taps
final
onFocus ValueChanged<bool>?
Handler called when the focus changes.
final
onHover ValueChanged<bool>?
Called when a pointer enters or exits the anchor area.
final
onLongPress VoidCallback?
Called when the user long-presses
final
onTap VoidCallback?
Called when the user taps
final
onTapCancel VoidCallback?
Called when the user cancels a tap that was started on
final
onTapDown GestureTapDownCallback?
Called when the user taps down
final
onTapUp GestureTapUpCallback?
Called when the user releases a tap that was started on
final
overlayColor Color?
The overlay color of the anchor when pressed, hovered over, or focused.
final
overlayDisabled bool?
Whether the overlay is disabled or not
final
overlayOpacity double?
The overlay opacity of the anchor when pressed, hovered over, or focused.
final
padding EdgeInsetsGeometry?
The padding between the contents of the anchor and the outside anchor.
final
radius double?
The radius of the overlay. If the shape is BoxShape.circle.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape BoxShape?
The shape (e.g., circle, rectangle) to use for the overlay drawn around this part of the anchor when pressed, hovered over, or focused.
final
style AnchorStyle?
The AnchorStyle to apply
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
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.
override
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