Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ios/Classes/SwiftFlutterTtsPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ extension AVSpeechSynthesisVoiceGender {
return "female"
case .unspecified:
return "unspecified"
@unknown default:
// AVSpeechSynthesisVoiceGender is an Objective-C enum, so a voice
// can report a case this build was not compiled against. Without
// this the switch traps and takes the whole app down.
return "unspecified"
}
}
}
5 changes: 5 additions & 0 deletions macos/Classes/FlutterTtsPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@ extension AVSpeechSynthesisVoiceGender {
return "female"
case .unspecified:
return "unspecified"
@unknown default:
// AVSpeechSynthesisVoiceGender is an Objective-C enum, so a voice
// can report a case this build was not compiled against. Without
// this the switch traps and takes the whole app down.
return "unspecified"
}
}
}