Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ListItem extends StatelessWidget {
- final Word word;
- ListItem({this.word});
- @override
- Widget build(BuildContext context) {
- return Container(
- margin: EdgeInsets.symmetric(horizontal: 15.0),
- child: Column(
- children: <Widget>[
- Row(
- children: <Widget>[
- SizedBox(
- width: MediaQuery.of(context).size.width * 0.5,
- height: MediaQuery.of(context).size.height / 30,
- child: FittedBox(
- fit: BoxFit.scaleDown,
- alignment: Alignment.centerLeft,
- child: Text(
- word.name,
- maxLines: 1,
- style:
- new TextStyle(color: Color(0xFF37274F), fontSize: 18.0),
- ),
- ),
- ),
- Expanded(
- child: Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: <Widget>[
- FittedBox(
- fit: BoxFit.scaleDown,
- child: Text(
- (word.isDe) ? 'de' : 'het',
- style: new TextStyle(
- color: Colors.blueGrey, fontSize: 13.0),
- ),
- ),
- Container(
- margin: EdgeInsets.symmetric(horizontal: 10.0),
- width: 1.0,
- color: Colors.black54),
- FittedBox(
- fit: BoxFit.scaleDown,
- child: Text(
- (word.isDe) ? 'die/deze' : 'dit/dat',
- style: new TextStyle(
- color: Colors.blueGrey, fontSize: 13.0),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- Container(
- margin: EdgeInsets.symmetric(vertical: 25.0),
- height: 0.2,
- color: Colors.black12),
- ],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement