TTSServiceState constructor

TTSServiceState({
  1. bool? isReady,
  2. String? currentVoice,
  3. Iterable<TTSVoiceInfo>? voices,
  4. Iterable<String>? supportedLanguageCodes,
  5. String? errorMessage,
  6. int? errorCode,
})

Implementation

factory TTSServiceState({
  $core.bool? isReady,
  $core.String? currentVoice,
  $core.Iterable<TTSVoiceInfo>? voices,
  $core.Iterable<$core.String>? supportedLanguageCodes,
  $core.String? errorMessage,
  $core.int? errorCode,
}) {
  final result = create();
  if (isReady != null) result.isReady = isReady;
  if (currentVoice != null) result.currentVoice = currentVoice;
  if (voices != null) result.voices.addAll(voices);
  if (supportedLanguageCodes != null)
    result.supportedLanguageCodes.addAll(supportedLanguageCodes);
  if (errorMessage != null) result.errorMessage = errorMessage;
  if (errorCode != null) result.errorCode = errorCode;
  return result;
}