capturePrimary method

void capturePrimary()

Snapshot the current engine selection into primary. Notifies only on change so a redundant capture (e.g. tap after a tap) doesn't churn the listener chain.

Implementation

void capturePrimary() {
  final t = _engine?.selectionText() ?? '';
  if (t != _primary) {
    _primary = t;
    notifyListeners();
  }
}