load method

Future<void> load()

Implementation

Future<void> load() async {
  read();
  if (reading != null) await reading!.future;
  if (loading != null) return loading!.future;
  if (bytes.isEmpty) {
    loading ??= Completer();
    try {
      bytes = await download(name);
    } catch (e) {
      print(e);
    }
    store();

    if (loading?.isCompleted == false) loading!.complete();
  }
  return;
}