Added order history cards
This commit is contained in:
@@ -1,6 +1,40 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gymlink_module_web/components/app_bar.dart';
|
||||
import 'package:gymlink_module_web/components/heading.dart';
|
||||
import 'package:gymlink_module_web/components/history_item_card.dart';
|
||||
|
||||
List<Map<String, String>> orders = [
|
||||
{
|
||||
"image": "product.png",
|
||||
"price": "120",
|
||||
"id": "34fa3126-bfaf-5dec-8f4a-b246c097ef73",
|
||||
"date": "11.09.2001"
|
||||
},
|
||||
{
|
||||
"image": "product.png",
|
||||
"price": "150",
|
||||
"id": "34a26e82-7656-5e98-a44a-c2d01d0b1ad1123",
|
||||
"date": "11.09.2001",
|
||||
},
|
||||
{
|
||||
"image": "product.png",
|
||||
"price": "250",
|
||||
"id": "4fb204b7-3f9e-52a2-bed1-415c00a31a37123",
|
||||
"date": "11.09.2001",
|
||||
},
|
||||
{
|
||||
"image": "product.png",
|
||||
"price": "300",
|
||||
"id": "09b2f5bb-683e-5c39-ae89-b8e152fa8bcf123",
|
||||
"date": "11.09.2001",
|
||||
},
|
||||
{
|
||||
"image": "product.png",
|
||||
"price": "100",
|
||||
"id": "cd1b6817-db94-5394-be1d-af88af79749f123",
|
||||
"date": "11.09.2001",
|
||||
}
|
||||
];
|
||||
|
||||
class HistoryPage extends StatelessWidget {
|
||||
const HistoryPage({
|
||||
@@ -8,14 +42,39 @@ class HistoryPage extends StatelessWidget {
|
||||
});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold(
|
||||
appBar: GymLinkAppBar(),
|
||||
body: Column(mainAxisAlignment: MainAxisAlignment.start, children: [
|
||||
GymLinkHeader(title: 'История заказов'),
|
||||
Center(
|
||||
child: Text('История заказов'),
|
||||
)
|
||||
]),
|
||||
return Scaffold(
|
||||
appBar: const GymLinkAppBar(),
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const GymLinkHeader(title: 'История заказов'),
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: orders.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = orders[index];
|
||||
return HistoryItemCard(
|
||||
id: item['id']!,
|
||||
cost: item['price']!,
|
||||
date: item['date']!,
|
||||
image: Image.asset(
|
||||
item['image']!,
|
||||
width: 50,
|
||||
),
|
||||
status: OrderStatus.completed,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user