Add auto ip check option

This commit is contained in:
problematicconsumer
2024-02-17 13:11:50 +03:30
parent 71fb84bea1
commit 611dff8a5b
5 changed files with 38 additions and 2 deletions

View File

@@ -186,3 +186,20 @@ class DynamicNotification extends _$DynamicNotification {
return _pref.update(value);
}
}
@riverpod
class AutoCheckIp extends _$AutoCheckIp {
late final _pref = Pref(
ref.watch(sharedPreferencesProvider).requireValue,
"auto_check_ip",
true,
);
@override
bool build() => _pref.getValue();
Future<void> update(bool value) {
state = value;
return _pref.update(value);
}
}