VAnchor class

The equivalent of a web anchor

Be default:

  • Clicking on this anchor will add its ^ hash at the end of the url (replacing the current one ^ if any)
  • If the hash appears in the url, it will try to scroll ^ to make this widget visible

On the web:

  • This will also display an overlay on the bottom ^ right indicating the target url
  • The mouse will change to a hover clickable cursor
Inheritance

Constructors

VAnchor({Key? key, required String hash, required Widget child, bool? replaceUrlOnTap, bool active = true, Duration duration = Duration.zero, Curve curve = Curves.ease, ScrollPositionAlignmentPolicy alignmentPolicy = ScrollPositionAlignmentPolicy.explicit, Alignment hoveringOverlayAlignment = Alignment.bottomLeft, Widget? hoveringOverlay})
const

Properties

active bool
Whether this anchor should be active
final
alignment double
Describes where the widget should be positioned after applying scroll animation.
final
alignmentPolicy ScrollPositionAlignmentPolicy
See ScrollPositionAlignmentPolicy to learn how the widget is aligned
final
child Widget
The child of this widget
final
curve Curve
The curve applied to the animation when animating this widget into view
final
duration Duration
How long the animation to make this widget visible will last
final
hash String
The hash associated with the anchor
final
hashCode int
The hash code for this object.
no setterinherited
hoveringOverlay Widget?
A widget to replace the overlay that will be display on hovering
final
hoveringOverlayAlignment Alignment
The alignment of the hovering overlay
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
replaceUrlOnTap bool?
Whether the newly created url should replace the previous one or create a new url entry
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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