fromJson static method

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

Implementation

static SpeechRecognitionResult? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case SpeechRecognitionResultError.constructor:
      return SpeechRecognitionResultError.fromJson(json);

    case SpeechRecognitionResultPending.constructor:
      return SpeechRecognitionResultPending.fromJson(json);

    case SpeechRecognitionResultText.constructor:
      return SpeechRecognitionResultText.fromJson(json);

    default:
      return null;
  }
}