PlayerEventsAddedEvent.fromJson constructor

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

Implementation

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