diff --git a/lib/buy.dart b/lib/buy.dart index ddc2963..8ec7578 100644 --- a/lib/buy.dart +++ b/lib/buy.dart @@ -12,16 +12,23 @@ class _BuyScreenState extends State { Widget build(BuildContext context) { TimeOfDay _time = TimeOfDay.now(); return Scaffold( - appBar: AppBar( - title: const Text('Sell'), - automaticallyImplyLeading: false, - ), - body: OffersListView(), + body: const OffersListView(), ); } } -final List entries = ['A', 'B', 'C']; +final List entries = [ + 'Antoinette Beauchamp', + 'Iliana Campbell', + 'Angelique Straub', + 'Ryleigh Pond', + 'Andy Watters', + 'Raphael Gossett', + 'Kent Deutsch', + 'Bridger Mojica', + 'Pearl Morse', + 'Jana Munguia' +]; final List colorCodes = [600, 500, 100]; class OffersListView extends StatelessWidget { @@ -30,14 +37,73 @@ class OffersListView extends StatelessWidget { @override Widget build(BuildContext context) { return ListView.builder( - padding: const EdgeInsets.all(8), itemCount: 30, itemBuilder: (BuildContext context, int index) { return Container( height: 80, - color: Colors.amber[colorCodes[index % 3]], - child: Center(child: Text('Entry ${entries[index % 3]}')), + color: Colors.blue, + margin: const EdgeInsets.only(top: 4, bottom: 4), + child: Row( + children: [ + Expanded( + flex: 7, + child: Container( + color: Colors.red, + margin: EdgeInsets.only(top: 4, left: 4, bottom: 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + entries[index % entries.length], + textAlign: TextAlign.start, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 24), + ), + Row( + children: [ + Icon(Icons.star, size: 16), + Icon(Icons.star, size: 16), + Icon(Icons.star, size: 16), + Icon(Icons.star_half, size: 16), + Icon(Icons.star_border, size: 16), + ], + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + const Text( + '\88:88PM - 88:88PM', + textAlign: TextAlign.start, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 16), + ), + ], + ), + ) + ], + ), + ), + ), + Expanded( + flex: 3, + child: Container( + color: Colors.orange, + child: const Text( + '\$88', + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 44), + ), + ), + ) + ], + ), ); }); } } +// return Container( +// height: 80, +// color: Colors.amber[colorCodes[index % colorCodes.length]], +// child: Center(child: Text(entries[index % entries.length])), +// ); \ No newline at end of file