added card
This commit is contained in:
parent
d029b5a3b1
commit
6c003ea70d
|
|
@ -1,8 +1,8 @@
|
|||
import 'package:cargo/presentation/presentation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../configs/configs.dart';
|
||||
import '../../core/core.dart';
|
||||
import '../widgets/order_header.dart';
|
||||
|
||||
class OrdersScreen extends StatelessWidget {
|
||||
const OrdersScreen({super.key});
|
||||
|
|
@ -43,7 +43,7 @@ class OrdersScreen extends StatelessWidget {
|
|||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(BuildContext context, int index) {
|
||||
return _buildOrderCard();
|
||||
return const OrderCard();
|
||||
},
|
||||
childCount: 4, // items.length,
|
||||
),
|
||||
|
|
@ -52,81 +52,4 @@ class OrdersScreen extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildOrderCard() {
|
||||
return Card(
|
||||
color: Colors.white,
|
||||
margin: Space.all(.8, 0.5),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'№ABC456789',
|
||||
style: AppText.b1b,
|
||||
),
|
||||
Text(
|
||||
'Genişleýin >',
|
||||
style: AppText.b1b?.copyWith(
|
||||
color: AppColors.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Row(
|
||||
children: [
|
||||
Icon(Icons.circle, color: Colors.green, size: 12),
|
||||
SizedBox(width: 4),
|
||||
Text('Ýolda'),
|
||||
Spacer(),
|
||||
Text('Ugradylan senesi: 16.07.2024'),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('Nireden:'),
|
||||
Text('Urumçy', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
SizedBox(height: 8),
|
||||
Text('Nirede:'),
|
||||
Text('Aşgabat', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text('Ýer sany:'),
|
||||
Text('10', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
SizedBox(height: 8),
|
||||
Text('Göwrümi:'),
|
||||
Text('1472,31', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('Maşyn №:'),
|
||||
Text('AA1234AA', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
SizedBox(height: 8),
|
||||
Text('Dukan №:'),
|
||||
Text('A1043', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,162 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../configs/configs.dart';
|
||||
import '../../core/core.dart';
|
||||
|
||||
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,
|
||||
),
|
||||
Text(
|
||||
'Genişleýin >',
|
||||
style: AppText.b1b?.copyWith(
|
||||
color: AppColors.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
/// gap
|
||||
Space.yf(0.5),
|
||||
|
||||
/// status bar
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.circle, color: Colors.green, size: 12),
|
||||
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
|
||||
Space.yf(0.75),
|
||||
|
||||
/// info bar
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: 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),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Spacer(flex: 1),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text('Ýer sany:'),
|
||||
Text(
|
||||
'10',
|
||||
style: AppText.b2b!.copyWith(
|
||||
color: const Color(0xFF96969C),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Text('Göwrümi:'),
|
||||
Text(
|
||||
'1472,31',
|
||||
style: AppText.b2b!.copyWith(
|
||||
color: const Color(0xFF57575C),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Spacer(flex: 1),
|
||||
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),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,3 +4,4 @@ export 'credential_failure_dialog.dart';
|
|||
export 'auth_error_dialog.dart';
|
||||
export 'bottom_navbar.dart';
|
||||
export 'order_header.dart';
|
||||
export 'order_card.dart';
|
||||
|
|
|
|||
Loading…
Reference in New Issue