Update core version

Update flutter version

Optimize ip check

Optimize url-test
This commit is contained in:
chen08209
2024-10-14 10:03:23 +08:00
parent 649dbb9886
commit 25764fc4d3
19 changed files with 263 additions and 137 deletions
+11 -4
View File
@@ -610,14 +610,18 @@ class AppController {
Future _updateSystemTray({
required bool isStart,
required Brightness? brightness,
bool force = false,
}) async {
await trayManager.destroy();
if (Platform.isLinux || force) {
await trayManager.destroy();
}
await trayManager.setIcon(
other.getTrayIconPath(
isStart: isStart,
brightness: brightness ??
WidgetsBinding.instance.platformDispatcher.platformBrightness,
),
isTemplate: true,
);
if (!Platform.isLinux) {
await trayManager.setToolTip(
@@ -626,11 +630,12 @@ class AppController {
}
}
updateTray() async {
updateTray([bool focus = false]) async {
if (!Platform.isLinux) {
await _updateSystemTray(
isStart: appFlowingState.isStart,
brightness: appState.brightness,
force: focus,
);
}
List<MenuItem> menuItems = [];
@@ -642,8 +647,9 @@ class AppController {
);
menuItems.add(showMenuItem);
final startMenuItem = MenuItem.checkbox(
label:
appFlowingState.isStart ? appLocalizations.stop : appLocalizations.start,
label: appFlowingState.isStart
? appLocalizations.stop
: appLocalizations.start,
onClick: (_) async {
globalState.appController.updateStart();
},
@@ -714,6 +720,7 @@ class AppController {
await _updateSystemTray(
isStart: appFlowingState.isStart,
brightness: appState.brightness,
force: focus,
);
}
}