downloadFile method
Downloads a file from the cloud storage.
Implementation
@override
Future<String> downloadFile({
required String remotePath,
required String localPath,
}) async {
if (!_isAuthenticated) {
throw Exception('Not authenticated');
}
final response = await client.pull(remotePath,
isAppFolder:
MultiCloudStorage.cloudAccess == CloudAccessType.appStorage);
final file = File(localPath);
await file.writeAsBytes(response.bodyBytes!);
return localPath;
}