loadInitiallyIfNeeded method

Future<void> loadInitiallyIfNeeded(
  1. BuildContext context
)

Load initial data only if the list is empty

Implementation

Future<void> loadInitiallyIfNeeded(BuildContext context) async {
  await fetchInit(context);
  if (_items.isNotEmpty) {
    return;
  }
  if (context.mounted) {
    await _load(context: context, pageNumber: _initialPage);
  }
}