DragState class

Data class representing drag state.

Constructors

DragState({required Offset startPosition, required Offset currentPosition, required Offset delta, bool isDragging = false})
Creates a DragState.
const

Properties

currentPosition → Offset
The current position of the drag.
final
delta → Offset
The delta from the last position.
final
hashCode → int
The hash code for this object.
no setterinherited
isDragging → bool
Whether the drag is active.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startPosition → Offset
The starting position of the drag.
final
totalDelta → Offset
The total distance dragged.
no setter

Methods

copyWith({Offset? startPosition, Offset? currentPosition, Offset? delta, bool? isDragging}) → DragState
Creates a copy with updated values.
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.
inherited

Constants

initial → const DragState
Initial drag state.