Initial commit for complete UI
This commit is contained in:
96
lib/screens/order_screen.dart
Normal file
96
lib/screens/order_screen.dart
Normal file
@@ -0,0 +1,96 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../models/order_model.dart';
|
||||
|
||||
import '../provider/order_provider.dart';
|
||||
import '../widgets/order_card.dart';
|
||||
|
||||
class OrdersScreen extends StatelessWidget {
|
||||
final TextStyle labelStyle = TextStyle(fontWeight: FontWeight.w500);
|
||||
final TextStyle valueStyle = TextStyle(fontWeight: FontWeight.normal);
|
||||
List<Order> orders = [
|
||||
Order(
|
||||
customerName: "Ankit Ghosh",
|
||||
mobileNumber: "8617015476",
|
||||
serviceType: "Doorstep Service",
|
||||
service: "Foam Wash",
|
||||
price: "₹ 104",
|
||||
time: "10:00 - 11:00 AM",
|
||||
date: "2025-05-28",
|
||||
carName: "Mahindra XUV 700",
|
||||
status: "Confirmed",
|
||||
imagePath: "assets/images/car.jpg",
|
||||
),
|
||||
Order(
|
||||
customerName: "Ravi Kumar",
|
||||
mobileNumber: "9876543210",
|
||||
serviceType: "Workshop",
|
||||
service: "Interior Cleaning",
|
||||
price: "₹ 150",
|
||||
time: "12:00 - 1:00 PM",
|
||||
date: "2025-05-29",
|
||||
carName: "Hyundai Creta",
|
||||
status: "Pending",
|
||||
imagePath: "assets/images/bike.png",
|
||||
),
|
||||
// Add more orders...
|
||||
];
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset('assets/icon/order_appbar_icon.png'),
|
||||
SizedBox(width: 20),
|
||||
Text(
|
||||
'Orders',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 24,
|
||||
color: Color.fromRGBO(43, 46, 53, 1),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
centerTitle: true,
|
||||
foregroundColor: Colors.black,
|
||||
elevation: 1,
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Consumer<OrderProvider>(
|
||||
builder: (context, orderProvider, _) {
|
||||
final orders = orderProvider.orders;
|
||||
|
||||
if (orders.isEmpty) {
|
||||
return Center(
|
||||
child: Image.asset(
|
||||
'assets/images/noorder.png',
|
||||
width: 200,
|
||||
height: 200,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
itemCount: orders.length,
|
||||
itemBuilder: (context, index) {
|
||||
return OrderCard(order: orders[index],);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user