cargo66/lib/presentation/widgets/order_card.dart

197 lines
6.3 KiB
Dart
Raw Normal View History

2024-07-23 11:36:50 +00:00
import 'package:flutter/material.dart';
import '../../configs/configs.dart';
import '../../core/core.dart';
2024-07-29 06:40:26 +00:00
import 'vertical_line.dart';
2024-07-23 11:36:50 +00:00
class OrderCard extends StatelessWidget {
const OrderCard({super.key});
@override
Widget build(BuildContext context) {
return Card(
color: Colors.white,
margin: Space.all(.8, 0.5),
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
/// Track number
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'№ABC456789',
style: AppText.b1b,
),
2024-07-24 12:14:17 +00:00
GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(AppRouter.orderDetails);
},
child: Text(
'Ginişleýin >',
style: AppText.b1b?.copyWith(
color: AppColors.primary,
),
2024-07-23 11:36:50 +00:00
),
),
],
),
/// gap
Space.yf(0.5),
/// status bar
Row(
children: [
2024-07-29 06:40:26 +00:00
const Icon(Icons.circle, color: AppColors.green, size: 12),
2024-07-23 11:36:50 +00:00
const SizedBox(width: 4),
Text(
'Ýolda',
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
const Spacer(),
Text(
'Ugradylan senesi: 16.07.2024',
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
],
),
/// gap
2024-07-24 06:59:16 +00:00
Space.y!,
const Divider(),
Space.y!,
2024-07-23 11:36:50 +00:00
/// info bar
Row(
children: [
Expanded(
2024-07-24 06:59:16 +00:00
flex: 2,
child: Row(
2024-07-23 11:36:50 +00:00
children: [
2024-07-24 06:59:16 +00:00
SizedBox(
width: AppDimensions.normalize(15),
2024-07-29 06:40:26 +00:00
child: VerticalLine(
width: AppDimensions.normalize(6),
height: AppDimensions.normalize(40),
topColor: AppColors.green,
bottomColor: AppColors.grey,
2024-07-23 11:36:50 +00:00
),
),
2024-07-24 06:59:16 +00:00
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Nireden:',
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
Text(
'Urumçy',
style: AppText.b2b!.copyWith(
color: const Color(0xFF57575C),
),
),
const SizedBox(height: 8),
Text(
'Nirede:',
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
Text(
'Aşgabat',
style: AppText.b2b!.copyWith(
color: const Color(0xFF57575C),
),
),
],
2024-07-23 11:36:50 +00:00
),
2024-07-24 06:59:16 +00:00
],
),
/* */
),
// const Spacer(flex: 1),
Expanded(
flex: 2,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
2024-07-23 11:36:50 +00:00
Text(
2024-07-24 06:59:16 +00:00
'Ýer sany:',
2024-07-23 11:36:50 +00:00
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
Text(
2024-07-24 06:59:16 +00:00
'10',
2024-07-23 11:36:50 +00:00
style: AppText.b2b!.copyWith(
color: const Color(0xFF57575C),
),
),
2024-07-24 06:59:16 +00:00
const SizedBox(height: 8),
2024-07-23 11:36:50 +00:00
Text(
2024-07-24 06:59:16 +00:00
'Göwrümi:',
2024-07-23 11:36:50 +00:00
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
Text(
'1472,31',
style: AppText.b2b!.copyWith(
color: const Color(0xFF57575C),
),
),
],
),
),
2024-07-24 06:59:16 +00:00
// const Spacer(flex: 1),
2024-07-23 11:36:50 +00:00
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Maşyn №:',
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
Text(
'AA1234AA',
style: AppText.b2b!.copyWith(
color: const Color(0xFF57575C),
),
),
const SizedBox(height: 8),
Text(
'Dukan №:',
style: AppText.b2b!.copyWith(
color: const Color(0xFF96969C),
),
),
Text(
'A1043',
style: AppText.b2b!.copyWith(
color: const Color(0xFF57575C),
),
),
],
),
),
],
),
],
),
),
);
}
}