feat: add permission screen shown before main screen
This commit is contained in:
parent
a7a6a6a82d
commit
650a6efeca
6 changed files with 562 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ class Preferences {
|
|||
static const String keyHeartbeat = 'heartbeat';
|
||||
static const String keyOfflineBuffer = 'offline_buffer';
|
||||
static const String keyStopDetection = 'stop_detection';
|
||||
static const String keyPermissionsGranted = 'permissions_granted';
|
||||
|
||||
static SharedPreferences? _instance;
|
||||
|
||||
|
|
@ -52,6 +53,13 @@ class Preferences {
|
|||
|
||||
static bool get stopDetection => instance.getBool(keyStopDetection) ?? true;
|
||||
|
||||
static bool get permissionsGranted =>
|
||||
instance.getBool(keyPermissionsGranted) ?? false;
|
||||
|
||||
static Future<void> setPermissionsGranted(bool value) async {
|
||||
await instance.setBool(keyPermissionsGranted, value);
|
||||
}
|
||||
|
||||
static Future<void> setServerUrl(String value) async {
|
||||
await instance.setString(keyServerUrl, value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue