StoreDownload class

Provides bulk downloading functionality for a specific FMTCStore


By default, only one download is allowed at any one time.

However, if necessary, multiple can be started by setting methods' instanceId argument to a unique value on methods. Whatever object instanceId is, it must have a valid and useful equality and hashCode implementation, as it is used as the key in a Map. Note that this unique value must be known and remembered to control the state of the download.

Warning

Starting multiple simultaneous downloads may lead to a noticeable performance loss. Ensure you thoroughly test and profile your application.


Does not keep state. State and download instances are held internally by DownloadInstance.

Annotations

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel({Object instanceId = 0}) Future<void>
Cancel the ongoing foreground download and recovery session
check(DownloadableRegion<BaseRegion> region) Future<int>
Check how many downloadable tiles are within a specified region
isPaused({Object instanceId = 0}) bool
Whether the ongoing foreground download is currently paused after a call to pause (and prior to resume)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause({Object instanceId = 0}) Future<void>
Pause the ongoing foreground download
resume({Object instanceId = 0}) → void
Resume (after a pause) the ongoing foreground download
startForeground({required DownloadableRegion<BaseRegion> region, int parallelThreads = 5, int maxBufferLength = 200, bool skipExistingTiles = false, bool skipSeaTiles = true, int? rateLimit, Duration? maxReportInterval = const Duration(seconds: 1), bool disableRecovery = false, List<String>? obscuredQueryParams, Object instanceId = 0}) Stream<DownloadProgress>
Download a specified DownloadableRegion in the foreground, with a recovery session by default
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited