initializeAppSaveLocale static method
Implementation
static Future<String> initializeAppSaveLocale() async {
Debug().info(
"Found the storage location at ${saveLocation.path}. Now asking for perms?");
if (Platform.isAndroid || Platform.isIOS) {
PermissionStatus status = await Permission.storage.status;
if (!status.isGranted) {
await Permission.storage.request();
}
}
if (!Directory(saveLocation.path).existsSync()) {
Directory(saveLocation.path).createSync(recursive: true);
Debug().info(
"Created the storage location at ${saveLocation.path}");
}
return saveLocation.path;
}