updateFocus method

void updateFocus(
  1. String nodeId,
  2. String fragmentId,
  3. int offset
)

Updates the focus during drag

Implementation

void updateFocus(String nodeId, String fragmentId, int offset) {
  if (_state.anchor == null) return;

  _state = SelectionState(
    anchor: _state.anchor,
    focus: SelectionPoint(
      nodeId: nodeId,
      fragmentId: fragmentId,
      offset: offset,
    ),
  );
  _rangeCache.clear();
  if (!_suppressNotifications) notifyListeners();
}