around method

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

Fetches the initial page of the items.

Implementation

@override
Future<void> around() async {
  Log.debug('around()', '$runtimeType');

  if (!status.value.isSuccess) {
    await ensureInitialized();
  } else if (items.isNotEmpty) {
    await clear();
  }

  final Page<V, C>? page = await pagination?.around(
    key: initialKey,
    cursor: initialCursor,
  );

  if (page != null) {
    for (var e in page.edges) {
      await _apply(pagination!.onKey(e), e);
    }
  }
}