getActiveUploadTasks method
Obtains the ongoing upload task list under the current reference.
Implementation
Future<List<AGCStorageUploadTask>> getActiveUploadTasks() async {
try {
final List<dynamic>? result =
await _methodChannel.invokeMethod<List<dynamic>?>(
'AGCStorageReference#getActiveUploadTasks',
<String, dynamic>{
'bucket': storage.bucket,
'policyIndex': storage.policy?.index,
'objectPath': path,
},
);
return (result ?? <String>[])
.cast<String>()
.map((String taskId) => AGCStorageUploadTask._(taskId, this))
.toList(growable: false);
} catch (e) {
throw AGCStorageException._from(e);
}
}