resume method

void resume({
  1. Object instanceId = 0,
})

Resume (after a pause) the ongoing foreground download

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 nothing if there is no ongoing download or the download is already running.

Implementation

void resume({Object instanceId = 0}) =>
    DownloadInstance.get(instanceId)?.requestResume?.call();