feat: task detail view (#633)

This commit is contained in:
Levi authored and GitHub committed 2024-08-08 18:34:00 +08:00
1 parent 3fd3dd49d2
commit 4d60c47d39
22 files changed
+280 -105

No files matched your search

@@ -195,7 +195,8 @@ class AppController extends GetxController with WindowListener, TrayListener {
} else if (Util.isMacos()) {
await trayManager.setIcon('assets/tray_icon/icon_mac.png',
isTemplate: true);
} else if (Platform.environment.containsKey('FLATPAK_ID') || Platform.environment.containsKey('SNAP')) {
} else if (Platform.environment.containsKey('FLATPAK_ID') ||
Platform.environment.containsKey('SNAP')) {
await trayManager.setIcon('com.gopeed.Gopeed');
} else {
await trayManager.setIcon('assets/tray_icon/icon.png');
@@ -269,16 +270,12 @@ class AppController extends GetxController with WindowListener, TrayListener {
FlutterForegroundTask.init(
androidNotificationOptions: AndroidNotificationOptions(
channelId: 'gopeed_service',
channelName: 'Gopeed Background Service',
channelImportance: NotificationChannelImportance.LOW,
showWhen: true,
priority: NotificationPriority.LOW,
iconData: const NotificationIconData(
resType: ResourceType.mipmap,
resPrefix: ResourcePrefix.ic,
name: 'launcher',
)),
channelId: 'gopeed_service',
channelName: 'Gopeed Background Service',
channelImportance: NotificationChannelImportance.LOW,
showWhen: true,
priority: NotificationPriority.LOW,
),
iosNotificationOptions: const IOSNotificationOptions(
showNotification: true,
playSound: false,
@@ -298,6 +295,11 @@ class AppController extends GetxController with WindowListener, TrayListener {
FlutterForegroundTask.startService(
notificationTitle: "serviceTitle".tr,
notificationText: "serviceText".tr,
notificationIcon: const NotificationIconData(
resType: ResourceType.mipmap,
resPrefix: ResourcePrefix.ic,
name: 'launcher',
),
);
}
}