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