saveFile static method
Implementation
static Future<String?> saveFile(String fileName, String fileType) async {
String? path = '';
try {
path = await FilePicker.platform.saveFile(
fileName: '$fileName.$fileType',
type: FileType.custom,
allowedExtensions: [fileType]
);
}
on PlatformException catch (e) {
console.error('Unsupported operation Select: $e');
}
catch (e) {
console.error('Select: $e');
}
return path;
}