showGroupedNotification method
Shows a grouped notification (Android)
Implementation
Future<void> showGroupedNotification({
required String title,
required String body,
required String groupKey,
required String groupTitle,
String? channelId,
Map<String, dynamic>? payload,
bool isSummary = false,
int? notificationId,
}) async {
try {
await _notificationService.showNotification(
id: notificationId ?? DateTime.now().millisecondsSinceEpoch ~/ 1000,
title: title,
body: body,
channelId: channelId,
payload: payload,
groupKey: groupKey,
sortKey: isSummary ? 'summary' : 'notification',
);
_logMessage(
'[NotificationManager] Grouped notification shown: $groupKey');
} catch (error, stack) {
_logMessage(
'[NotificationManager] Show grouped notification error: $error');
_logMessage('[NotificationManager] Stack trace: $stack');
}
}