file static method
Implementation
static Future<bool> file(String reason) async {
if (!Platform.isIOS) {
BaseToast.showToast(reason, isAutoDismiss: false);
}
final status = await Permission.storage.request();
if (!Platform.isIOS) {
BaseToast.cancel();
}
if (status.isGranted) {
return true;
} else {
BaseToast.showError("未获取文件访问权限,请在设置中获取文件访问权限");
return false;
}
}