Add network auto control feature for mobile platforms

Co-authored-by: monkeyWie <[email protected]>
This commit is contained in:
copilot-swe-agent[bot]andmonkeyWie committed 2025-08-11 08:04:35 +00:00
1 parent 25bf3ca65b
commit 431fdd0d54
7 files changed
+148 -1

No files matched your search

+9
View File
@@ -10,6 +10,7 @@ const String _windowState = 'windowState';
const String _bookmark = 'bookmark';
const String _createHistory = 'createHistory';
const String _webToken = 'webToken';
const String _networkAutoControl = 'networkAutoControl';
class Database {
static final Database _instance = Database._internal();
@@ -109,4 +110,12 @@ class Database {
void clearCreateHistory() {
clear(_createHistory);
}
void saveNetworkAutoControl(bool enabled) {
save<bool>(_networkAutoControl, enabled);
}
bool getNetworkAutoControl() {
return get<bool>(_networkAutoControl, (json) => json as bool) ?? false;
}
}