configure method

void configure(
  1. DVFileStorageAdapter adapter
)

Swaps the storage behind DV.FileStorage. Defaults to DVMemoryFileStorageAdapter; pass an S3FileStorageAdapter for an object store.

An active host's storage (a browser extension's, from a package that registers one) still takes precedence where the host provides it, since that is the only storage such a target can reach.

Implementation

void configure(DVFileStorageAdapter adapter) {
  if (_bound != null) {
    throw StateError(
      'This storage is bound to ${_bound.runtimeType} and cannot be '
      'reconfigured. DV.FileStorage.configure changes the app default; '
      'DV.Platform.fileStorage is always the device disk.',
    );
  }
  _adapter = adapter;
}