retry static method
Retries a failed download task.
parameters:
taskId
: unique identifier of a failed download tasktimeout
: http request connection timeout. Android only.
return:
An unique identifier of a new download task that is created to start the failed download progress from the beginning
Implementation
static Future<String?> retry({
required String taskId,
bool requiresStorageNotLow = true,
int timeout = 15000,
}) async {
assert(_initialized, 'plugin flutter_downloader is not initialized');
try {
return await _channel.invokeMethod('retry', {
'task_id': taskId,
'requires_storage_not_low': requiresStorageNotLow,
'timeout': timeout,
});
} on PlatformException catch (e) {
_log(e.message);
return null;
}
}