release
This commit is contained in:
@@ -30,8 +30,11 @@ class FloatingButtonsVisibilityManager {
|
||||
|
||||
Future<void> init() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
_isVisible = prefs.getBool(_key) ?? true;
|
||||
_visibleNotifier.value = _isVisible;
|
||||
final visible = prefs.getBool(_key) ?? true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_isVisible = visible;
|
||||
_visibleNotifier.value = visible;
|
||||
});
|
||||
}
|
||||
|
||||
bool get isVisible => _isVisible;
|
||||
@@ -59,10 +62,12 @@ class FloatingButtonsVisibilityManager {
|
||||
|
||||
Future<void> _restoreFromFlashing() async {
|
||||
_cancelAllTimers();
|
||||
_isFlashing = false;
|
||||
_flashingNotifier.value = false;
|
||||
_isVisible = true;
|
||||
_visibleNotifier.value = true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_isFlashing = false;
|
||||
_flashingNotifier.value = false;
|
||||
_isVisible = true;
|
||||
_visibleNotifier.value = true;
|
||||
});
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setBool(_key, true);
|
||||
}
|
||||
@@ -107,8 +112,10 @@ class FloatingButtonsVisibilityManager {
|
||||
|
||||
void dispose() {
|
||||
_cancelAllTimers();
|
||||
_visibleNotifier.value = true;
|
||||
_flashingNotifier.value = false;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_visibleNotifier.value = true;
|
||||
_flashingNotifier.value = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user