savePosition method

void savePosition()

Stores the current position. Called when a drag ends.

Implementation

void savePosition() {
  final offset = _offset;
  if (offset == null) return;
  _storage.writeDouble(_offsetXKey, offset.dx);
  _storage.writeDouble(_offsetYKey, offset.dy);
}