SpeechRecognitionResult.fromJson constructor

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

Parses whichever SpeechRecognitionResult subtype the JSON describes.

Implementation

factory SpeechRecognitionResult.fromJson(Map<String, dynamic> json) {
  final object = tdObjectFactories[json['@type']]?.call(json);
  return object is SpeechRecognitionResult
      ? object
      : UndecodedSpeechRecognitionResult(json);
}