Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.13 KB | None | 0 0
  1. class ListItem extends StatelessWidget {
  2.   final Word word;
  3.   ListItem({this.word});
  4.  
  5.   @override
  6.   Widget build(BuildContext context) {
  7.     return Container(
  8.       margin: EdgeInsets.symmetric(horizontal: 15.0),
  9.       child: Column(
  10.         children: <Widget>[
  11.           Row(
  12.             children: <Widget>[
  13.               SizedBox(
  14.                 width: MediaQuery.of(context).size.width * 0.5,
  15.                 height: MediaQuery.of(context).size.height / 30,
  16.                 child: FittedBox(
  17.                   fit: BoxFit.scaleDown,
  18.                   alignment: Alignment.centerLeft,
  19.                   child: Text(
  20.                     word.name,
  21.                     maxLines: 1,
  22.                     style:
  23.                         new TextStyle(color: Color(0xFF37274F), fontSize: 18.0),
  24.                   ),
  25.                 ),
  26.               ),
  27.               Expanded(
  28.                 child: Row(
  29.                   mainAxisAlignment: MainAxisAlignment.end,
  30.                   children: <Widget>[
  31.                     FittedBox(
  32.                       fit: BoxFit.scaleDown,
  33.                       child: Text(
  34.                         (word.isDe) ? 'de' :  'het',
  35.                         style: new TextStyle(
  36.                             color: Colors.blueGrey, fontSize: 13.0),
  37.                       ),
  38.                     ),
  39.                     Container(
  40.                         margin: EdgeInsets.symmetric(horizontal: 10.0),
  41.                         width: 1.0,
  42.                         color: Colors.black54),
  43.                     FittedBox(
  44.                       fit: BoxFit.scaleDown,
  45.                       child: Text(
  46.                         (word.isDe) ? 'die/deze' : 'dit/dat',
  47.                         style: new TextStyle(
  48.                             color: Colors.blueGrey, fontSize: 13.0),
  49.                       ),
  50.                     ),
  51.                   ],
  52.                 ),
  53.               ),
  54.             ],
  55.           ),
  56.           Container(
  57.               margin: EdgeInsets.symmetric(vertical: 25.0),
  58.               height: 0.2,
  59.               color: Colors.black12),
  60.         ],
  61.       ),
  62.     );
  63.   }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement