TF-4193 Handle multi click to enable Label visibility feature

This commit is contained in:
dab246
2025-12-09 13:43:43 +07:00
committed by Dat H. Pham
parent d1cd9efbab
commit 10038a3836
23 changed files with 330 additions and 43 deletions
@@ -0,0 +1,18 @@
import 'package:shared_preferences/shared_preferences.dart';
class SettingCacheManager {
static const String _labelVisibilitySettingKey = 'LABEL_VISIBILITY';
const SettingCacheManager(this._sharedPreferences);
final SharedPreferences _sharedPreferences;
Future<bool> getLabelVisibility() async {
await _sharedPreferences.reload();
return _sharedPreferences.getBool(_labelVisibilitySettingKey) ?? false;
}
Future<void> saveLabelVisibility(bool visible) async {
await _sharedPreferences.setBool(_labelVisibilitySettingKey, visible);
}
}