Skip to content

Instantly share code, notes, and snippets.

@wiredprairie
Created February 26, 2018 13:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wiredprairie/cb6362a3a125bea1b65994a837035bd6 to your computer and use it in GitHub Desktop.
_showGameItem(BuildContext context, BoardGameItem item) {
Navigator.push(context, new MaterialPageRoute(
builder: (BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(item.name)
),
body: new SizedBox.expand(
child: new Hero(tag: item.id,
child: new Container(
child: new Column(
children: <Widget>[
new Container(
child: new ConstrainedBox(
constraints: const BoxConstraints(
maxHeight: 250.0, maxWidth: 250.0),
child: new Image.network(
item.thumbnailUrl, width: 250.0,
fit: BoxFit.scaleDown)
))
],)))));
}
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment