ChatMessage constructor Null safety
- {@JsonKey(name: 'fromId') required ParticipantId fromParticipantId,
- @JsonKey(name: 'name') String? fromParticipantName,
- required DateTime date,
- DateTime? received,
- required String message,
- String? room,
- @Default(false) bool local,
- @JsonKey(fromJson: reactionsFromJson, ignore: true) @Default({}) Map<
String, Set< reactions}ParticipantId> >
Implementation
const factory ChatMessage({
@JsonKey(name: 'fromId') required ParticipantId fromParticipantId,
@JsonKey(name: 'name') String? fromParticipantName,
required DateTime date,
DateTime? received,
required String message,
String? room,
@Default(false) bool local,
@JsonKey(fromJson: reactionsFromJson, ignore: true) @Default({}) Map<String, Set<ParticipantId>> reactions,
}) = _ChatMessage;