NotificationManager class
Manages local and system notifications for the MCP UI Runtime
Constructors
- NotificationManager.new({bool enableDebugMode = kDebugMode})
Properties
-
activeNotifications
→ List<
MCPNotification> -
Gets all active notifications
no setter
-
channels
→ List<
NotificationChannel> -
Gets all notification channels
no setter
- enableDebugMode → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Gets whether the notification manager is initialized
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addChannel(
NotificationChannel channel) → void - Adds a notification channel
-
addListener(
NotificationListener listener) → void - Adds a notification listener
-
dismissAllNotifications(
) → Future< void> - Dismisses all notifications
-
dismissNotification(
String notificationId) → Future< void> - Dismisses a notification
-
dispose(
) → Future< void> - Disposes the notification manager and cleans up resources
-
getChannel(
String channelId) → NotificationChannel? - Gets a notification channel by ID
-
handleNotificationAction(
String notificationId, String actionId) → Future< void> - Handles notification action (when user taps action button)
-
handleNotificationTap(
String notificationId) → Future< void> - Handles notification tap (when user taps the notification itself)
-
initialize(
{List< NotificationChannel> ? channels, bool requestPermissions = true}) → Future<void> - Initializes the notification manager
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
NotificationListener listener) → void - Removes a notification listener
-
scheduleNotification(
MCPNotification notification, DateTime scheduledTime) → Future< void> - Schedules a notification for future delivery
-
showNotification(
MCPNotification notification) → Future< void> - Shows a local notification
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited