start method

  1. @override
Future<void> start(
  1. ModelEntry entry, {
  2. required String directory,
  3. required String partFileName,
  4. required bool wifiOnly,
})
override

Starts downloading entry into the absolute folder directory as partFileName, from the first byte. wifiOnly asks for Wi-Fi (a downloader that cannot tell networks apart ignores it).

Implementation

@override
Future<void> start(
  ModelEntry entry, {
  required String directory,
  required String partFileName,
  required bool wifiOnly,
}) async {
  calls.add('start ${entry.id} wifiOnly=$wifiOnly');
  started.add(FakeDownloadStart(entry, directory: directory, partFileName: partFileName, wifiOnly: wifiOnly));
  kept.remove(entry.id);
  emit(ModelDownloadUpdate(id: entry.id, state: ModelDownloadState.queued));
}