Skip to content

Commit ecfd9a9

Browse files
Remove init checks for locales (#344)
Co-authored-by: Stephen Owens <[email protected]>
1 parent f957399 commit ecfd9a9

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

speech_to_text/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public class SpeechToTextPlugin :
365365
}
366366

367367
private fun locales(result: Result) {
368-
if (sdkVersionTooLow() ) {
368+
if (sdkVersionTooLow()) {
369369
result.success(false)
370370
return
371371
}

speech_to_text/lib/speech_to_text.dart

-3
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,6 @@ class SpeechToText {
564564
/// languages available for online recognition. Unfortunately there is no
565565
/// way to get the list of languages supported by the online recognizer.
566566
Future<List<LocaleName>> locales() async {
567-
if (!_initWorked) {
568-
throw SpeechToTextNotInitializedException();
569-
}
570567
final locales = await SpeechToTextPlatform.instance.locales();
571568
var filteredLocales = locales
572569
.map((locale) {

0 commit comments

Comments
 (0)