mrtnetwork / flutter_windows_notification

A library for sending notifications on Windows using Flutter
MIT License
17 stars 4 forks source link

initNotificationCallBack is returning only EventType.onDismissed #8

Closed ImPabl0 closed 1 year ago

ImPabl0 commented 1 year ago

Its returning the same result everytime, even if i click on notification or dismiss the notification.

mrtnetwork commented 1 year ago

Its returning the same result everytime, even if i click on notification or dismiss the notification.

update plugin to last version

/// https://learn.microsoft.com/en-us/uwp/api/windows.ui.notifications.toastdismissalreason?view=winrt-22621
enum EventType {
  onActivate,

  /// The app explicitly hid the toast notification by calling the ToastNotifier.hide method.
  onDismissedApplicationHidden,

  /// The user dismissed the toast notification.
  onDismissedUserCanceled,

  /// The toast notification had been shown for the maximum allowed time and was faded out.
  /// The maximum time to show a toast notification is 7 seconds except in the case of long-duration toasts,
  /// in which case it is 25 seconds.
  onDismissedTimedOut
}
ImPabl0 commented 1 year ago

Oh thanks! I forgot to check my plugin version.