Skip to content

Commit

Permalink
feat(desktop): close button for minimize notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingkor Roy Tirtho committed Apr 27, 2023
1 parent 1cc62c4 commit 1688f99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/components/shared/page_window_title_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1688f99

Please sign in to comment.