ConversationEventDto.fromJson constructor

ConversationEventDto.fromJson(
  1. Json j
)

Parses the wire shape.

Implementation

factory ConversationEventDto.fromJson(Json j) => ConversationEventDto(
  id: strOr(j, 'id'),
  conversationId: strOr(j, 'conversation_id'),
  seq: intOr(j, 'seq'),
  type: strOr(j, 'type'),
  actorType: SenderType.parse(str(j, 'actor_type')),
  actorId: str(j, 'actor_id'),
  data: mapOf(j, 'data') ?? const {},
  createdAt: dateOf(j, 'created_at') ?? DateTime.fromMillisecondsSinceEpoch(0),
);