Skip to content

Commit

Permalink
Remove init checks for locales (#344)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Owens <sowens@csdcorp.com>
  • Loading branch information
figengungor and sowens-csd committed Oct 24, 2023
1 parent f957399 commit ecfd9a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public class SpeechToTextPlugin :
}

private fun locales(result: Result) {
if (sdkVersionTooLow() ) {
if (sdkVersionTooLow()) {
result.success(false)
return
}
Expand Down
3 changes: 0 additions & 3 deletions speech_to_text/lib/speech_to_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,6 @@ class SpeechToText {
/// languages available for online recognition. Unfortunately there is no
/// way to get the list of languages supported by the online recognizer.
Future<List<LocaleName>> locales() async {
if (!_initWorked) {
throw SpeechToTextNotInitializedException();
}
final locales = await SpeechToTextPlatform.instance.locales();
var filteredLocales = locales
.map((locale) {
Expand Down

0 comments on commit ecfd9a9

Please sign in to comment.