From 1688f99096af940ead65e67832c6f061a6f635ac Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Thu, 27 Apr 2023 22:29:58 +0600 Subject: [PATCH] feat(desktop): close button for minimize notification --- lib/components/shared/page_window_title_bar.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/components/shared/page_window_title_bar.dart b/lib/components/shared/page_window_title_bar.dart index cd70756d..b46795c1 100644 --- a/lib/components/shared/page_window_title_bar.dart +++ b/lib/components/shared/page_window_title_bar.dart @@ -9,11 +9,17 @@ import 'dart:math'; import 'package:flutter/foundation.dart' show kIsWeb; import 'dart:io' show Platform; import 'package:flutter_desktop_tools/flutter_desktop_tools.dart'; +import 'package:local_notifier/local_notifier.dart'; final closeNotification = DesktopTools.createNotification( title: 'Spotube', message: 'Running in background. Minimized to System Tray', -); + actions: [ + LocalNotificationAction(text: 'Close The App'), + ], +)?..onClickAction = (value) { + windowManager.close(); + }; class PageWindowTitleBar extends StatefulHookWidget implements PreferredSizeWidget {