feat(desktop): close button for minimize notification

This commit is contained in:
Kingkor Roy Tirtho 2023-04-27 22:29:58 +06:00
parent 1cc62c40a0
commit 1688f99096

View File

@ -9,11 +9,17 @@ import 'dart:math';
import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/foundation.dart' show kIsWeb;
import 'dart:io' show Platform; import 'dart:io' show Platform;
import 'package:flutter_desktop_tools/flutter_desktop_tools.dart'; import 'package:flutter_desktop_tools/flutter_desktop_tools.dart';
import 'package:local_notifier/local_notifier.dart';
final closeNotification = DesktopTools.createNotification( final closeNotification = DesktopTools.createNotification(
title: 'Spotube', title: 'Spotube',
message: 'Running in background. Minimized to System Tray', message: 'Running in background. Minimized to System Tray',
); actions: [
LocalNotificationAction(text: 'Close The App'),
],
)?..onClickAction = (value) {
windowManager.close();
};
class PageWindowTitleBar extends StatefulHookWidget class PageWindowTitleBar extends StatefulHookWidget
implements PreferredSizeWidget { implements PreferredSizeWidget {