SpeechRecognitionResult constructor

SpeechRecognitionResult({
  1. Iterable<SpeechRecognitionAlternative>? alternatives,
  2. int? channelTag,
  3. Duration? resultEndOffset,
  4. String? languageCode,
})

Implementation

factory SpeechRecognitionResult({
  $core.Iterable<SpeechRecognitionAlternative>? alternatives,
  $core.int? channelTag,
  $5.Duration? resultEndOffset,
  $core.String? languageCode,
}) {
  final $result = create();
  if (alternatives != null) {
    $result.alternatives.addAll(alternatives);
  }
  if (channelTag != null) {
    $result.channelTag = channelTag;
  }
  if (resultEndOffset != null) {
    $result.resultEndOffset = resultEndOffset;
  }
  if (languageCode != null) {
    $result.languageCode = languageCode;
  }
  return $result;
}