showNotification method
Show notification
Implementation
@override
Future<void> showNotification({
required String title,
required String body,
String? icon,
String id = 'mcp_notification',
}) async {
if (!_initialized) {
throw MCPException('Web platform is not initialized');
}
if (_notificationManager == null) {
_logger.fine('Notification manager is not available');
return;
}
await _notificationManager!.showNotification(
title: title,
body: body,
icon: icon,
id: id,
);
}