attachStorage method

Future<void> attachStorage(
  1. String key
)

Binds persistence to key (for example after the document fingerprint is known) and loads it.

Implementation

Future<void> attachStorage(String key) async {
  if (_storageKey == key && _loaded) return;
  _storageKey = key;
  _loaded = false;
  await load();
}