espero que nao presisse mudar.

This commit is contained in:
2026-06-11 09:52:06 +01:00
parent 947e119dba
commit 29e887cb14
4 changed files with 128 additions and 68 deletions

View File

@@ -0,0 +1,20 @@
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);
}
}