isPaused method

bool isPaused({
  1. Object instanceId = 0,
})

Whether the ongoing foreground download is currently paused after a call to pause (and prior to resume)

Also returns false if there is no ongoing download.


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

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. Note that instances are shared across all stores.

Warning

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

Implementation

bool isPaused({Object instanceId = 0}) =>
    DownloadInstance.get(instanceId)?.isPaused ?? false;