PlayerMessagesLoggedEvent.fromJson constructor

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

Implementation

factory PlayerMessagesLoggedEvent.fromJson(Map<String, dynamic> json) {
  return PlayerMessagesLoggedEvent(
    playerId: PlayerId.fromJson(json['playerId'] as String),
    messages: (json['messages'] as List)
        .map((e) => PlayerMessage.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}