getDirectoryPath method
Implementation
@override
Future<String?> getDirectoryPath(String dialogTitle, bool lockParentWindow, String initialDirectory) async {
try {
return await methodChannel.invokeMethod('dir', {});
} on PlatformException catch (ex) {
if (ex.code == "unknown_path") {
debugPrint(
'[$_tag] Could not resolve directory path. Maybe it\'s a protected one or unsupported (such as Downloads folder). If you are on Android, make sure that you are on SDK 21 or above.');
}
}
return null;
}