showChatNotification method
Shows a chat-style notification with interactive actions
Implementation
Future<void> showChatNotification({
required ChatNotificationModel model,
}) async {
if (!_isInitialized) {
throw StateError(
'PlatformNotificationService must be initialized before showing notifications');
}
if (!supportsChatNotifications) {
return showNotification(model: model);
}
final userImageFile = await _loadUserImage(model.userImageUrl);
final messagingStyle = _createMessagingStyle(model, userImageFile);
final chatModel = model.copyWith(
androidDetails: _createChatAndroidDetails(messagingStyle, model),
);
return showNotification(model: chatModel);
}