Created
December 14, 2019 22:31
-
-
Save juliuscanute/f349a56cfb5ae02b182fc2c6e8c0f860 to your computer and use it in GitHub Desktop.
Display retrieved emotions
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 SavedEmotionsList extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return StoreConnector<EmotionAppState, _ViewModelSavedEmotion>( | |
| converter: _ViewModelSavedEmotion.fromStore, | |
| builder: (context, vm) { | |
| return ListView.builder( | |
| itemBuilder: (BuildContext context, int index) => | |
| SavedEmotionsListItem( | |
| index: index, | |
| emotionImage: vm.getEmotionImage(index), | |
| emotionDescription: vm.getEmotionDescription(index), | |
| emotionDate: vm.getDate(index), | |
| emotionTime: vm.getTime(index), | |
| ), | |
| itemCount: vm.getEmotionCount(), | |
| ); | |
| }, | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment