Last active
December 14, 2019 22:47
-
-
Save juliuscanute/f51e8f669d0be58eca3e3fbaed3f679c to your computer and use it in GitHub Desktop.
View emotion detail
This file contains hidden or 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
| class _ViewDetailState extends State<ViewDetail> { | |
| @override | |
| Widget build(BuildContext context) { | |
| return StoreConnector<EmotionAppState, _ViewModel>( | |
| converter: _ViewModel.fromStore, | |
| builder: (context, vm) { | |
| /*...*/ | |
| child: Center( | |
| child: Text( | |
| vm.getEmotionImage(), | |
| style: TextStyle(fontSize: 72.0), | |
| ), | |
| ), | |
| ), | |
| Container( | |
| padding: EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 4.0), | |
| child: Center( | |
| child: Text( | |
| vm.getDate(), | |
| style: Theme.of(context).textTheme.subhead, | |
| ), | |
| ), | |
| ), | |
| Container( | |
| padding: EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 16.0), | |
| child: Center( | |
| child: Text( | |
| vm.getTime(), | |
| style: Theme.of(context).textTheme.subtitle, | |
| ), | |
| ), | |
| ), | |
| Container( | |
| padding: EdgeInsets.all(16.0), | |
| child: Text( | |
| vm.getEmotionDescription(), | |
| style: Theme.of(context).textTheme.body1, | |
| ), | |
| ) | |
| ], | |
| ), | |
| ), | |
| ); | |
| }), | |
| ); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment