Created
April 15, 2021 02:21
-
-
Save jtmuller5/c74df24501d8d7e22570d3d4cc05b7ae 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:flutter/material.dart'; | |
import 'package:stacked/stacked.dart'; | |
import 'single_command_view_model.dart'; | |
class SingleCommandView extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return ViewModelBuilder<SingleCommandViewModel>.reactive( | |
viewModelBuilder: () => SingleCommandViewModel(), | |
onModelReady: (model) { | |
// model.initialize(); | |
}, | |
builder: (context, model, child) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Single Command'), | |
), | |
body: Center( | |
child: Column( | |
children: [ | |
ElevatedButton(onPressed: (){ | |
model.startListening(); | |
}, child: Text('Start listening'),), | |
Text(model.recognizedWords) | |
], | |
), | |
) | |
); | |
}, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment