SessionEvent.fromJson constructor

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

Deserialize from JSON, dispatching on the 'type' field.

Implementation

factory SessionEvent.fromJson(Map<String, dynamic> json) {
  final type = json['type'] as String;
  return _factories[type]?.call(json) ?? UnknownEvent._fromJson(json, type);
}