Skip to content

Instantly share code, notes, and snippets.

@wiredprairie
Created February 22, 2018 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wiredprairie/39249b188c8eab4427a09bf930677bf1 to your computer and use it in GitHub Desktop.
Save wiredprairie/39249b188c8eab4427a09bf930677bf1 to your computer and use it in GitHub Desktop.
example-flutter-1.dart
return new Container(
margin: const EdgeInsets.symmetric(vertical: 6.0, horizontal: 8.0),
child:
new Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Container(
margin: const EdgeInsets.only(right: 16.0),
child: new ConstrainedBox(
constraints: const BoxConstraints(
maxHeight: 100.0, maxWidth: 100.0),
child: new Image.network(
item.thumbnailUrl, width: 100.0, fit: BoxFit.scaleDown)
),
),
new Expanded(
child: new Text(item.name),
),
new Text(item.yearPublished),
]
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment