Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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