RealtimeTranslationErrorEvent.fromJson constructor
Creates from JSON.
Implementation
factory RealtimeTranslationErrorEvent.fromJson(Map<String, dynamic> json) {
if (json['type'] != 'error') {
throw FormatException(
'RealtimeTranslationErrorEvent.fromJson expected type "error", got '
'${json['type']}',
);
}
return RealtimeTranslationErrorEvent(
eventId: json['event_id'] as String,
error: RealtimeTranslationError.fromJson(
json['error'] as Map<String, dynamic>,
),
);
}