жесты

This commit is contained in:
Jganenok
2026-05-28 00:07:27 +07:00
parent 15bcc086d7
commit ccc93f9e62
9 changed files with 282 additions and 26 deletions
@@ -0,0 +1,20 @@
import 'package:flutter/foundation.dart';
import 'package:shared_preferences/shared_preferences.dart';
class AppSwipeBackDesktop {
static const prefKey = 'dev_swipe_back_desktop';
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);
}
}