copyWith method

DragState copyWith({
  1. Offset? startPosition,
  2. Offset? currentPosition,
  3. Offset? delta,
  4. bool? isDragging,
})

Creates a copy with updated values.

Implementation

DragState copyWith({
  Offset? startPosition,
  Offset? currentPosition,
  Offset? delta,
  bool? isDragging,
}) {
  return DragState(
    startPosition: startPosition ?? this.startPosition,
    currentPosition: currentPosition ?? this.currentPosition,
    delta: delta ?? this.delta,
    isDragging: isDragging ?? this.isDragging,
  );
}