Created
April 15, 2021 02:22
-
-
Save jtmuller5/a316c22004777ff2c0b3643537f83604 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:desk_monkey/services/services.dart'; | |
import 'package:stacked/stacked.dart'; | |
class SingleCommandViewModel extends BaseViewModel{ | |
String recognizedWords = ''; | |
void initialize(){ | |
} | |
void startListening(){ | |
speechService.startListening((result) { | |
print('Recognized words: '+ result.recognizedWords); | |
if(result.recognizedWords != null){ | |
recognizedWords = result.recognizedWords; | |
notifyListeners(); | |
} | |
}); | |
} | |
@override | |
void dispose() { | |
super.dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment