downloadMultipleFile method
Future<String?>
downloadMultipleFile({
- required List<
String?> urls, - required List<
String> fileNames, - required Function response,
- bool? saveToPhoto = false,
- bool? showToastAndroid = false,
override
Implementation
@override
Future<String?> downloadMultipleFile({
required List<String?> urls,
required List<String> fileNames,
required Function response,
bool? saveToPhoto = false,
bool? showToastAndroid = false
}) async {
try {
final result = await downloadMultipleFileMethodChannel.invokeMethod<String>(
downloadMultipleFileMethod, { 'urls': urls,
'file_names': fileNames,
'save_to_photo': saveToPhoto,
'show_toast': showToastAndroid
});
response(result);
return result;
} on PlatformException catch (e) {
debugPrint("PlatformException: ${e.code} - ${e.message}");
response(e);
return "PlatformException: ${e.code} - ${e.message}";
} catch (e) {
response(e);
return "Exception: $e";
}
}