update permission check (issue if android 13 > 0) + appbundle 2.0.2

This commit is contained in:
Thomas Fransolet 2024-02-28 18:52:25 +01:00
parent a3fab323a4
commit 78cf90d3c0
4 changed files with 19 additions and 7 deletions

Binary file not shown.

View File

@ -50,7 +50,7 @@ class _DownloadConfigurationWidgetState extends State<DownloadConfigurationWidge
Map<Permission, PermissionStatus> statuses = await [ Map<Permission, PermissionStatus> statuses = await [
Permission.storage, Permission.storage,
].request(); ].request();
if(statuses[Permission.storage] == PermissionStatus.granted) { //if(statuses[Permission.storage] == PermissionStatus.granted) {
try{ try{
try { try {
Directory directory = Directory('${tabletAppContext.localPath}'); Directory directory = Directory('${tabletAppContext.localPath}');
@ -107,9 +107,21 @@ class _DownloadConfigurationWidgetState extends State<DownloadConfigurationWidge
} catch(e) { } catch(e) {
print("ERRORRRR"); print("ERRORRRR");
print(e); print(e);
if(statuses[Permission.storage] != PermissionStatus.granted) {
Fluttertoast.showToast(
msg: "PermissionStatus not granted, issue may be linked to that. Please check os version (if less than 13, real issue).",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
timeInSecForIosWeb: 1,
backgroundColor: Colors.redAccent,
textColor: Colors.white,
fontSize: 16.0
);
}
return false; return false;
} }
} else { /*} else {
print("PermissionStatus.granted NOT GRANTED"); print("PermissionStatus.granted NOT GRANTED");
Fluttertoast.showToast( Fluttertoast.showToast(
msg: "PermissionStatus not granted", msg: "PermissionStatus not granted",
@ -121,7 +133,7 @@ class _DownloadConfigurationWidgetState extends State<DownloadConfigurationWidge
fontSize: 16.0 fontSize: 16.0
); );
return false; return false;
} }*/
} }
} }

View File

@ -3,8 +3,8 @@ FLUTTER_ROOT=C:\PROJ\flutter
FLUTTER_APPLICATION_PATH=C:\Users\ThomasFransolet\Documents\Documents\Perso\MuseeDeLaFraise\tablet-app FLUTTER_APPLICATION_PATH=C:\Users\ThomasFransolet\Documents\Documents\Perso\MuseeDeLaFraise\tablet-app
COCOAPODS_PARALLEL_CODE_SIGN=true COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=2.0.1 FLUTTER_BUILD_NAME=2.0.2
FLUTTER_BUILD_NUMBER=7 FLUTTER_BUILD_NUMBER=8
DART_OBFUSCATION=false DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false TREE_SHAKE_ICONS=false

View File

@ -4,8 +4,8 @@ export "FLUTTER_ROOT=C:\PROJ\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\ThomasFransolet\Documents\Documents\Perso\MuseeDeLaFraise\tablet-app" export "FLUTTER_APPLICATION_PATH=C:\Users\ThomasFransolet\Documents\Documents\Perso\MuseeDeLaFraise\tablet-app"
export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=2.0.1" export "FLUTTER_BUILD_NAME=2.0.2"
export "FLUTTER_BUILD_NUMBER=7" export "FLUTTER_BUILD_NUMBER=8"
export "DART_OBFUSCATION=false" export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true" export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false" export "TREE_SHAKE_ICONS=false"