preload static method

Future<void> preload(
  1. List<Store> stores
)

Preloads and restores data for a list of stores.

This function waits until all data restoration operations for the provided stores are complete. This is useful when you need to ensure data is available before launching the app.

Implementation

static Future<void> preload(List<Store> stores) async {
  await Future.wait(
    stores.map((store) => store.restoring).whereType<Future<void>>(),
  );
}