PointerPosition class

Data class for pointer position information.

Contains both the normalized alignment position and the raw pixel offset relative to the widget bounds.

Constructors

PointerPosition({required Alignment position, required Offset offset})
const

Properties

hashCode int
The hash code for this object.
no setteroverride
offset Offset
The raw pixel offset relative to the widget's top-left corner.
final
position Alignment
The normalized position as an Alignment where:
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

maybeOf(BuildContext context) PointerPosition?
Gets the cursor position without creating a dependency.
notifierOf(BuildContext context) PointerPositionNotifier?
Gets the notifier for direct listening.
of(BuildContext context) PointerPosition?
Gets the current cursor position from the nearest provider.