ChatMessageReaction constructor Null safety

const ChatMessageReaction(
  1. {@JsonKey(name: 'fromId') required ParticipantId fromParticipantId,
  2. @Default(false) bool seen,
  3. required ChatMessage message,
  4. required String reaction,
  5. required String skinTone}
)

Implementation

const factory ChatMessageReaction({
  @JsonKey(name: 'fromId') required ParticipantId fromParticipantId,
  @Default(false) bool seen,

  /// The chat message as it looked BEFORE the reaction was added or removed.
  ///
  /// Ie. if the message's reaction map entry for [reaction] contains [fromParticipantId], then that was the state
  /// before this action happened and the user clicked to REMOVE [reaction].
  required ChatMessage message,

  /// The reaction
  required String reaction,
  required String skinTone,
}) = _ChatMessageReaction;