isPaused method
Whether the ongoing foreground download is currently paused after a call to pause (and prior to resume)
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.
Also returns false
if there is no ongoing download.
Implementation
bool isPaused({Object instanceId = 0}) =>
DownloadInstance.get(instanceId)?.isPaused ?? false;