ChatEvent.fromJson constructor

ChatEvent.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory ChatEvent.fromJson(Map<String, dynamic> json) => ChatEvent(
  id: int.parse(json['id']),
  date: json['date'],
  memberId: MessageSender.fromJson(json['member_id']),
  action: ChatEventAction.fromJson(json['action']),
);