Skip to content

Instantly share code, notes, and snippets.

@hjJunior
Created December 10, 2018 15:42
Show Gist options
  • Save hjJunior/8fe67be6af64a510bd9e6382f87f0a0f to your computer and use it in GitHub Desktop.
Save hjJunior/8fe67be6af64a510bd9e6382f87f0a0f to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import '../models/beer.dart';
class BeerTile extends StatelessWidget {
final Beer _beer;
BeerTile(this._beer);
@override
Widget build(BuildContext context) => Column(
children: <Widget>[
ListTile(
title: Text(_beer.name),
subtitle: Text(_beer.tagline),
leading: Container(
margin: EdgeInsets.only(left: 6.0),
child: Image.network(_beer.image_url, height: 50.0, fit: BoxFit.fill,)
),
),
Divider()
],
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment