71 lines
2.1 KiB
Dart
71 lines
2.1 KiB
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:gascom/constants/app_theme.dart';
|
|
import 'package:gascom/screens/order_details_screen.dart';
|
|
import 'package:gascom/widgets/order_state_badge.dart';
|
|
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
|
|
|
class OrderContainer extends StatelessWidget {
|
|
const OrderContainer({
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
|
decoration: BoxDecoration(
|
|
color: AppTheme.cardColor,
|
|
borderRadius: BorderRadius.circular(10),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: AutoSizeText(
|
|
"2024/12/12",
|
|
style: Theme.of(context).textTheme.bodySmall,
|
|
),
|
|
),
|
|
const OrderStateBadge(state: "قيد المراجعة"),
|
|
],
|
|
),
|
|
const SizedBox(height: 8),
|
|
AutoSizeText(
|
|
"5000 لتر",
|
|
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
const SizedBox(height: 2),
|
|
AutoSizeText(
|
|
"رقم الطلب: 67895435",
|
|
style: Theme.of(context).textTheme.bodySmall,
|
|
),
|
|
const SizedBox(height: 4),
|
|
const Divider(
|
|
color: AppTheme.primaryColor,
|
|
thickness: 1,
|
|
height: 25,
|
|
),
|
|
InkWell(
|
|
splashColor: AppTheme.primaryColor,
|
|
onTap: () {
|
|
pushScreenWithoutNavBar(context, OrderDetailsScreen());
|
|
},
|
|
child: Center(
|
|
child: AutoSizeText(
|
|
"اظهر التفاصيل",
|
|
style: Theme.of(context).textTheme.bodySmall,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|