SnapResult class

Result of a snap position calculation.

Contains the snapped visual position and whether snapping is active on each axis.

Constructors

SnapResult({required Offset position, bool snappingX = false, bool snappingY = false})
const
SnapResult.none(Offset position)
Creates a "no snapping" result - use the intended position as-is.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isSnapping bool
Whether any snapping is active.
no setter
position Offset
The snapped visual position.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snappingX bool
Whether the X axis is actively snapping.
final
snappingY bool
Whether the Y axis is actively snapping.
final

Methods

copyWith({Offset? position, bool? snappingX, bool? snappingY}) SnapResult
Creates a copy with fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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