mirror of
https://github.com/SoPat712/RUSwipeShare.git
synced 2025-08-21 19:08:46 -04:00
buy ui
This commit is contained in:
84
lib/buy.dart
84
lib/buy.dart
@@ -12,16 +12,23 @@ class _BuyScreenState extends State<BuyScreen> {
|
||||
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<String> entries = <String>['A', 'B', 'C'];
|
||||
final List<String> entries = <String>[
|
||||
'Antoinette Beauchamp',
|
||||
'Iliana Campbell',
|
||||
'Angelique Straub',
|
||||
'Ryleigh Pond',
|
||||
'Andy Watters',
|
||||
'Raphael Gossett',
|
||||
'Kent Deutsch',
|
||||
'Bridger Mojica',
|
||||
'Pearl Morse',
|
||||
'Jana Munguia'
|
||||
];
|
||||
final List<int> colorCodes = <int>[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])),
|
||||
// );
|
Reference in New Issue
Block a user