restore method

  1. @override
Future<void> restore({
  1. Iterable<DownloadTarget> targets = const [],
})
override

Reattaches to downloads that ran while the app was suspended or closed, and reports their state. targets name where the manager's models would be written: a downloader that keeps no records of its own (the foreground HttpModelDownloader) reports a part file an earlier process left there as a paused download, which it can then resume or discard; one that keeps its records ignores them.

Implementation

@override
Future<void> restore({Iterable<DownloadTarget> targets = const []}) async {
  calls.add('restore');
  restoredTargets = List.unmodifiable(targets);
  restored.forEach(emit);
}