getDownloadUrl method
Obtains the sharing URL of a cloud file.
Implementation
Future<String> getDownloadUrl() async {
try {
final String? result = await _methodChannel.invokeMethod<String?>(
'AGCStorageReference#getDownloadUrl',
<String, dynamic>{
'bucket': storage.bucket,
'policyIndex': storage.policy?.index,
'objectPath': path,
},
);
return result!;
} catch (e) {
throw AGCStorageException._from(e);
}
}