deliverSelectionChanges method

  1. @override
bool deliverSelectionChanges()
override

Synchronously deliver all SelectionChangeRecords.

Returns true if any records were delivered.

Implementation

@override
bool deliverSelectionChanges() {
  if (hasSelectionObservers &&
      _selectionChangeRecords != null &&
      _selectionChangeRecords!.isNotEmpty) {
    //if (hasSelectionObservers) {
    var records = UnmodifiableListView<SelectionChangeRecord<T>>(
        _selectionChangeRecords!);
    _selectionChangeRecords = null;
    if (_selectionChangeController != null) {
      _selectionChangeController!.add(records);
    }
    return true;
  } else {
    return false;
  }
}