Files
PlayMaker/lib/utils/session_manager.dart
2026-06-11 09:52:06 +01:00

21 lines
558 B
Dart

import 'package:shared_preferences/shared_preferences.dart';
class SessionManager {
static const _key = 'session_in_progress';
static Future<void> setInProgress(bool v) async {
final prefs = await SharedPreferences.getInstance();
await prefs.setBool(_key, v);
}
static Future<bool> isInProgress() async {
final prefs = await SharedPreferences.getInstance();
return prefs.getBool(_key) ?? false;
}
static Future<void> clear() async {
final prefs = await SharedPreferences.getInstance();
await prefs.remove(_key);
}
}