copyWith method

SpeechListenOptions copyWith({
  1. bool? cancelOnError,
  2. bool? partialResults,
  3. bool? onDevice,
  4. ListenMode? listenMode,
  5. int? sampleRate,
  6. bool? autoPunctuation,
  7. bool? enableHapticFeedback,
  8. Duration? pauseFor,
  9. Duration? listenFor,
  10. String? localeId,
  11. List<String>? contextualPhrases,
})

Implementation

SpeechListenOptions copyWith({
  bool? cancelOnError,
  bool? partialResults,
  bool? onDevice,
  ListenMode? listenMode,
  int? sampleRate,
  bool? autoPunctuation,
  bool? enableHapticFeedback,
  Duration? pauseFor,
  Duration? listenFor,
  String? localeId,
  List<String>? contextualPhrases,
}) {
  return SpeechListenOptions(
      cancelOnError: cancelOnError ?? this.cancelOnError,
      partialResults: partialResults ?? this.partialResults,
      onDevice: onDevice ?? this.onDevice,
      listenMode: listenMode ?? this.listenMode,
      sampleRate: sampleRate ?? this.sampleRate,
      autoPunctuation: autoPunctuation ?? this.autoPunctuation,
      enableHapticFeedback: enableHapticFeedback ?? this.enableHapticFeedback,
      pauseFor: pauseFor ?? this.pauseFor,
      listenFor: listenFor ?? this.listenFor,
      localeId: localeId ?? this.localeId,
      contextualPhrases: contextualPhrases ?? this.contextualPhrases);
}