invalidate method

  1. @override
Future<void> invalidate()
override

Invalidates caches and implies that data should be re-fetched while trying to keep the current collection state (f.e. page offset and size in PagedCollectionController).

Implementation

@override
Future<void> invalidate() async {
  final value = _streamController.valueOrNull?.valueOrNull;
  if (value == null) {
    return;
  }

  await loadPage(value.page, value.pageSize, invalidate: true);
}