Created
February 26, 2018 13:31
-
-
Save wiredprairie/cb6362a3a125bea1b65994a837035bd6 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
_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