Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Last active December 14, 2019 22:47
Show Gist options
  • Select an option

  • Save juliuscanute/f51e8f669d0be58eca3e3fbaed3f679c to your computer and use it in GitHub Desktop.

Select an option

Save juliuscanute/f51e8f669d0be58eca3e3fbaed3f679c to your computer and use it in GitHub Desktop.
View emotion detail
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