notifySelectionChange method

  1. @override
void notifySelectionChange({
  1. Iterable<T> added = const [],
  2. Iterable<T> removed = const [],
})
override

Schedules a SelectionChangeRecord.

Implementation

@override
void notifySelectionChange(
    {Iterable<T> added = const [], Iterable<T> removed = const []}) {
  if (hasSelectionObservers) {
    var record = SelectionChangeRecord<T>(added: added, removed: removed);
    if (_selectionChangeRecords == null) {
      _selectionChangeRecords = [];
      scheduleMicrotask(deliverSelectionChanges);
    }
    _selectionChangeRecords!.add(record);
  }
}