resume static method

Future<String?> resume({
  1. required String taskId,
  2. bool requiresStorageNotLow = true,
  3. int timeout = 15000,
})

Resumes a paused download task with id taskId.

Returns a new DownloadTask that is created to continue the partial download progress. The new DownloadTask has a new taskId.

Implementation

static Future<String?> resume({
  required String taskId,
  bool requiresStorageNotLow = true,
  int timeout = 15000,
}) async {
  assert(_initialized, 'plugin flutter_downloader is not initialized');

  try {
    return await _channel.invokeMethod('resume', {
      'task_id': taskId,
      'requires_storage_not_low': requiresStorageNotLow,
      'timeout': timeout,
    });
  } on PlatformException catch (e) {
    _log(e.message);
    return null;
  }
}