FileDownloader constructor

FileDownloader({
  1. PersistentStorage? persistentStorage,
})

Implementation

factory FileDownloader({PersistentStorage? persistentStorage}) {
  assert(
      _singleton == null || persistentStorage == null,
      'You can only supply a persistentStorage on the very first call to '
      'FileDownloader()');
  _singleton ??= FileDownloader._internal(
      persistentStorage ?? LocalStorePersistentStorage());
  return _singleton!;
}