feat: мимикрия протокола (opcode 6 + LZ4) и фиксы UI (истории, 2FA)

This commit is contained in:
klockky
2026-06-02 18:28:31 +00:00
parent d35729e911
commit 5ff914b0dc
10 changed files with 177 additions and 40 deletions
+20
View File
@@ -0,0 +1,20 @@
import 'package:flutter/foundation.dart';
import 'package:shared_preferences/shared_preferences.dart';
class AppStories {
static const prefKey = 'dev_stories';
static const bool defaultValue = false;
static final ValueNotifier<bool> current = ValueNotifier(defaultValue);
static Future<bool> load() async {
final prefs = await SharedPreferences.getInstance();
return prefs.getBool(prefKey) ?? defaultValue;
}
static Future<void> save(bool value) async {
current.value = value;
final prefs = await SharedPreferences.getInstance();
await prefs.setBool(prefKey, value);
}
}