fear: rev 2

This commit is contained in:
efrilm
2025-09-02 19:49:01 +07:00
parent 3624f75bea
commit 6599e6fe7c
15 changed files with 563 additions and 1023 deletions
@@ -108,141 +108,146 @@ class _SuccessPaymentPageState extends State<SuccessPaymentPage> {
child: Column(
children: [
// Success Header
Container(
width: double.infinity,
padding: const EdgeInsets.all(32.0),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
AppColors.primary.withOpacity(0.1),
AppColors.primary.withOpacity(0.05),
],
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(24),
),
),
child: Column(
children: [
// Success Icon
Container(
padding: const EdgeInsets.all(20.0),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
AppColors.primary,
AppColors.primary.withOpacity(0.8),
],
),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: AppColors.primary.withOpacity(0.3),
blurRadius: 20,
offset: const Offset(0, 10),
),
],
),
child: const Icon(
Icons.check_rounded,
size: 48,
color: Colors.white,
),
),
const SizedBox(height: 24),
// Success Title
const Text(
'Pesanan Berhasil!',
style: TextStyle(
fontSize: 26,
fontWeight: FontWeight.bold,
color: AppColors.primary,
),
),
const SizedBox(height: 12),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.2),
borderRadius: BorderRadius.circular(20),
),
child: const Text(
'Pesanan telah diterima dan sedang diproses',
style: TextStyle(
fontSize: 14,
color: AppColors.primary,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
],
),
),
// Order Information Section
Expanded(
child: Padding(
padding: const EdgeInsets.all(24.0),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildSectionTitle('Informasi Pesanan'),
const SizedBox(height: 24),
// Customer Card
_buildInfoCard(
icon: Icons.person_outline_rounded,
title: 'Nama Pelanggan',
value: order.metadata?['customer_name'] ?? "-",
gradient: [
Colors.blue.withOpacity(0.1),
Colors.purple.withOpacity(0.1),
],
),
const SizedBox(height: 16),
// Order Details
Expanded(
Container(
width: double.infinity,
padding: const EdgeInsets.all(32.0),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
AppColors.primary.withOpacity(0.1),
AppColors.primary.withOpacity(0.05),
],
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(24),
),
),
child: Column(
children: [
_buildInfoRow(
icon: Icons.receipt_long_outlined,
label: 'No. Pesanan',
value: order.orderNumber ?? "-",
// Success Icon
Container(
padding: const EdgeInsets.all(20.0),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
AppColors.primary,
AppColors.primary.withOpacity(0.8),
],
),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: AppColors.primary.withOpacity(0.3),
blurRadius: 20,
offset: const Offset(0, 10),
),
],
),
child: const Icon(
Icons.check_rounded,
size: 48,
color: Colors.white,
),
),
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.table_restaurant_outlined,
label: 'No. Meja',
value: order.tableNumber ?? "-",
const SizedBox(height: 24),
// Success Title
const Text(
'Pesanan Berhasil!',
style: TextStyle(
fontSize: 26,
fontWeight: FontWeight.bold,
color: AppColors.primary,
),
),
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.access_time_rounded,
label: 'Waktu',
value: (order.createdAt ?? DateTime.now())
.toFormattedDate3(),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.2),
borderRadius: BorderRadius.circular(20),
),
child: const Text(
'Pesanan telah diterima dan sedang diproses',
style: TextStyle(
fontSize: 14,
color: AppColors.primary,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.check_circle_outline,
label: 'Status Pembayaran',
value: 'Lunas',
valueColor: Colors.green,
showBadge: true,
],
),
),
// Order Information Section
Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildSectionTitle('Informasi Pesanan'),
const SizedBox(height: 24),
// Customer Card
_buildInfoCard(
icon: Icons.person_outline_rounded,
title: 'Nama Pelanggan',
value: order.metadata?['customer_name'] ?? "-",
gradient: [
Colors.blue.withOpacity(0.1),
Colors.purple.withOpacity(0.1),
],
),
const SizedBox(height: 16),
// Order Details
Expanded(
child: Column(
children: [
_buildInfoRow(
icon: Icons.receipt_long_outlined,
label: 'No. Pesanan',
value: order.orderNumber ?? "-",
),
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.receipt_long_outlined,
label: 'Metode Pembayaran',
value: widget.paymentMethod,
),
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.access_time_rounded,
label: 'Waktu',
value: (order.createdAt ?? DateTime.now())
.toFormattedDate3(),
),
const SizedBox(height: 12),
_buildInfoRow(
icon: Icons.check_circle_outline,
label: 'Status Pembayaran',
value: 'Lunas',
valueColor: Colors.green,
showBadge: true,
),
],
),
),
],
),