nexo/packages/messaging_flutter/lib/src/notification_opened_event.dart
toki 5e4089c629 feat: notification pipeline implementation
- Update messaging Flutter plugin with Firebase messaging service improvements
- Add notification helper and custom push notification helper enhancements
- Implement notification opened event handling
- Add Android unit tests for payload gate and notification helpers
- Update flutter-test app with integration and widget tests
- Update notification pipeline roadmap and task documentation
2026-05-31 06:34:44 +09:00

26 lines
688 B
Dart

class NotificationOpenedEvent {
final String? serverUrl;
final String? channelId;
final String? rootId;
final bool isCRTEnabled;
const NotificationOpenedEvent({
this.serverUrl,
this.channelId,
this.rootId,
this.isCRTEnabled = false,
});
factory NotificationOpenedEvent.fromMap(Map<String, dynamic> data) {
return NotificationOpenedEvent(
serverUrl: data['server_url'] as String?,
channelId: data['channel_id'] as String?,
rootId: data['root_id'] as String?,
isCRTEnabled: _parseCrtEnabled(data['is_crt_enabled']),
);
}
}
bool _parseCrtEnabled(Object? value) {
return value == true || value == 'true' || value == '1';
}