Compare commits
3 Commits
74d706b32a
...
2d596a25b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d596a25b9 | ||
|
|
dcf76b5fed | ||
|
|
4dc56662c8 |
@ -4,6 +4,7 @@ import 'package:carousel_slider/carousel_slider.dart';
|
|||||||
|
|
||||||
import '../../../../../common/theme/theme.dart';
|
import '../../../../../common/theme/theme.dart';
|
||||||
import '../../../../components/image/image.dart';
|
import '../../../../components/image/image.dart';
|
||||||
|
import '../../../../router/app_router.gr.dart';
|
||||||
import 'widgets/feature_section.dart';
|
import 'widgets/feature_section.dart';
|
||||||
import 'widgets/lottery_card.dart';
|
import 'widgets/lottery_card.dart';
|
||||||
import 'widgets/point_card.dart';
|
import 'widgets/point_card.dart';
|
||||||
@ -70,6 +71,8 @@ class _HomePageState extends State<HomePage> {
|
|||||||
return Positioned(
|
return Positioned(
|
||||||
top: MediaQuery.of(context).padding.top + 10,
|
top: MediaQuery.of(context).padding.top + 10,
|
||||||
right: 16,
|
right: 16,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => context.router.push(NotificationRoute()),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -99,6 +102,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import '../../../../../../common/theme/theme.dart';
|
import '../../../../../../common/theme/theme.dart';
|
||||||
|
import '../../../../../router/app_router.gr.dart';
|
||||||
import '../order_page.dart';
|
import '../order_page.dart';
|
||||||
|
|
||||||
class OrderCard extends StatelessWidget {
|
class OrderCard extends StatelessWidget {
|
||||||
@ -10,7 +12,9 @@ class OrderCard extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return GestureDetector(
|
||||||
|
onTap: () => context.router.push(OrderDetailRoute(order: order)),
|
||||||
|
child: Container(
|
||||||
margin: const EdgeInsets.only(bottom: 16),
|
margin: const EdgeInsets.only(bottom: 16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.white,
|
color: AppColor.white,
|
||||||
@ -23,9 +27,6 @@ class OrderCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: InkWell(
|
|
||||||
onTap: () => _showOrderDetail(order),
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(18),
|
padding: const EdgeInsets.all(18),
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -325,8 +326,4 @@ class OrderCard extends StatelessWidget {
|
|||||||
final formatter = NumberFormat('#,###');
|
final formatter = NumberFormat('#,###');
|
||||||
return formatter.format(amount);
|
return formatter.format(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _showOrderDetail(Order order) {
|
|
||||||
// Implementation for showing order details
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../../../../common/theme/theme.dart';
|
import '../../../../../../common/theme/theme.dart';
|
||||||
import '../../../../../../common/ui/clipper/voucher_clipper.dart';
|
import '../../../../../../common/ui/clipper/voucher_clipper.dart';
|
||||||
import '../../../../../../common/ui/painter/dashed_line_painter.dart';
|
import '../../../../../../common/ui/painter/dashed_line_painter.dart';
|
||||||
|
import '../../../../../router/app_router.gr.dart';
|
||||||
|
|
||||||
class VoucherCard extends StatelessWidget {
|
class VoucherCard extends StatelessWidget {
|
||||||
final String title;
|
final String title;
|
||||||
@ -19,7 +21,9 @@ class VoucherCard extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return GestureDetector(
|
||||||
|
onTap: () => context.router.push(VoucherDetailRoute()),
|
||||||
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
@ -76,7 +80,10 @@ class VoucherCard extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(color: Colors.grey[300]!, width: 1),
|
border: Border.all(
|
||||||
|
color: Colors.grey[300]!,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
@ -204,6 +211,7 @@ class VoucherCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
270
lib/presentation/pages/notification/notification_page.dart
Normal file
270
lib/presentation/pages/notification/notification_page.dart
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../../common/theme/theme.dart';
|
||||||
|
|
||||||
|
@RoutePage()
|
||||||
|
class NotificationPage extends StatelessWidget {
|
||||||
|
const NotificationPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColor.background,
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text(
|
||||||
|
'Notifikasi',
|
||||||
|
style: AppStyle.xl.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: AppColor.backgroundLight,
|
||||||
|
elevation: 0,
|
||||||
|
iconTheme: IconThemeData(color: AppColor.textPrimary),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => _markAllAsRead(context),
|
||||||
|
child: Text(
|
||||||
|
'Tandai Semua',
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
color: AppColor.primary,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
bottom: PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(1),
|
||||||
|
child: Container(height: 1, color: AppColor.borderLight),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: ListView(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 8),
|
||||||
|
children: [
|
||||||
|
// Today Section
|
||||||
|
_buildSectionHeader('Hari Ini'),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.local_offer,
|
||||||
|
iconColor: AppColor.primary,
|
||||||
|
iconBgColor: AppColor.primaryWithOpacity(0.1),
|
||||||
|
title: 'Voucher Baru Tersedia!',
|
||||||
|
subtitle: 'Dapatkan diskon 50% untuk pembelian pertama Anda',
|
||||||
|
time: '2 menit lalu',
|
||||||
|
isUnread: true,
|
||||||
|
),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.shopping_bag,
|
||||||
|
iconColor: AppColor.success,
|
||||||
|
iconBgColor: AppColor.successWithOpacity(0.1),
|
||||||
|
title: 'Pesanan Sedang Dikirim',
|
||||||
|
subtitle: 'Pesanan #ORD-2024-001 sedang dalam perjalanan',
|
||||||
|
time: '1 jam lalu',
|
||||||
|
isUnread: true,
|
||||||
|
),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.payment,
|
||||||
|
iconColor: AppColor.info,
|
||||||
|
iconBgColor: AppColor.info.withOpacity(0.1),
|
||||||
|
title: 'Pembayaran Berhasil',
|
||||||
|
subtitle:
|
||||||
|
'Pembayaran untuk pesanan #ORD-2024-001 telah dikonfirmasi',
|
||||||
|
time: '3 jam lalu',
|
||||||
|
isUnread: false,
|
||||||
|
),
|
||||||
|
|
||||||
|
// Yesterday Section
|
||||||
|
_buildSectionHeader('Kemarin'),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.star,
|
||||||
|
iconColor: AppColor.warning,
|
||||||
|
iconBgColor: AppColor.warningWithOpacity(0.1),
|
||||||
|
title: 'Berikan Rating Produk',
|
||||||
|
subtitle: 'Bagaimana pengalaman Anda dengan produk yang dibeli?',
|
||||||
|
time: '1 hari lalu',
|
||||||
|
isUnread: false,
|
||||||
|
),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.local_shipping,
|
||||||
|
iconColor: AppColor.success,
|
||||||
|
iconBgColor: AppColor.successWithOpacity(0.1),
|
||||||
|
title: 'Pesanan Telah Diterima',
|
||||||
|
subtitle: 'Pesanan #ORD-2024-002 telah sampai di tujuan',
|
||||||
|
time: '1 hari lalu',
|
||||||
|
isUnread: false,
|
||||||
|
),
|
||||||
|
|
||||||
|
// This Week Section
|
||||||
|
_buildSectionHeader('Minggu Ini'),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.campaign,
|
||||||
|
iconColor: AppColor.primary,
|
||||||
|
iconBgColor: AppColor.primaryWithOpacity(0.1),
|
||||||
|
title: 'Flash Sale 12.12!',
|
||||||
|
subtitle: 'Jangan lewatkan flash sale dengan diskon hingga 70%',
|
||||||
|
time: '3 hari lalu',
|
||||||
|
isUnread: false,
|
||||||
|
),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.card_giftcard,
|
||||||
|
iconColor: AppColor.secondary,
|
||||||
|
iconBgColor: AppColor.secondary.withOpacity(0.1),
|
||||||
|
title: 'Poin Reward Ditambahkan',
|
||||||
|
subtitle: 'Selamat! Anda mendapat 100 poin dari transaksi terakhir',
|
||||||
|
time: '5 hari lalu',
|
||||||
|
isUnread: false,
|
||||||
|
),
|
||||||
|
_buildNotificationItem(
|
||||||
|
icon: Icons.security,
|
||||||
|
iconColor: AppColor.textSecondary,
|
||||||
|
iconBgColor: AppColor.textSecondary.withOpacity(0.1),
|
||||||
|
title: 'Keamanan Akun',
|
||||||
|
subtitle: 'Login dari perangkat baru terdeteksi',
|
||||||
|
time: '6 hari lalu',
|
||||||
|
isUnread: false,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildSectionHeader(String title) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.fromLTRB(16, 16, 16, 8),
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildNotificationItem({
|
||||||
|
required IconData icon,
|
||||||
|
required Color iconColor,
|
||||||
|
required Color iconBgColor,
|
||||||
|
required String title,
|
||||||
|
required String subtitle,
|
||||||
|
required String time,
|
||||||
|
required bool isUnread,
|
||||||
|
}) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||||
|
padding: EdgeInsets.all(16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: isUnread
|
||||||
|
? AppColor.primary.withOpacity(0.02)
|
||||||
|
: AppColor.backgroundLight,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(
|
||||||
|
color: isUnread
|
||||||
|
? AppColor.primary.withOpacity(0.1)
|
||||||
|
: AppColor.borderLight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => _handleNotificationTap(title),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Icon Container
|
||||||
|
Container(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: iconBgColor,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
child: Icon(icon, color: iconColor, size: 24),
|
||||||
|
),
|
||||||
|
SizedBox(width: 12),
|
||||||
|
|
||||||
|
// Content
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (isUnread)
|
||||||
|
Container(
|
||||||
|
width: 8,
|
||||||
|
height: 8,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.primary,
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
subtitle,
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
height: 1.4,
|
||||||
|
),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
time,
|
||||||
|
style: AppStyle.xs.copyWith(color: AppColor.textLight),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Options Menu
|
||||||
|
IconButton(
|
||||||
|
onPressed: () => _showNotificationOptions(title),
|
||||||
|
icon: Icon(Icons.more_vert, color: AppColor.textLight, size: 20),
|
||||||
|
constraints: BoxConstraints(),
|
||||||
|
padding: EdgeInsets.all(4),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _markAllAsRead(BuildContext context) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
'Semua notifikasi ditandai sebagai dibaca',
|
||||||
|
style: AppStyle.md.copyWith(color: AppColor.white),
|
||||||
|
),
|
||||||
|
backgroundColor: AppColor.success,
|
||||||
|
behavior: SnackBarBehavior.floating,
|
||||||
|
margin: EdgeInsets.all(16),
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleNotificationTap(String title) {
|
||||||
|
// Handle notification tap - navigate to relevant page
|
||||||
|
print('Notification tapped: $title');
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showNotificationOptions(String title) {
|
||||||
|
// Show bottom sheet or popup menu for notification options
|
||||||
|
print('Show options for: $title');
|
||||||
|
}
|
||||||
|
}
|
||||||
905
lib/presentation/pages/order/order_detail/order_detail_page.dart
Normal file
905
lib/presentation/pages/order/order_detail/order_detail_page.dart
Normal file
@ -0,0 +1,905 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../../common/theme/theme.dart';
|
||||||
|
import '../../main/pages/order/order_page.dart';
|
||||||
|
|
||||||
|
@RoutePage()
|
||||||
|
class OrderDetailPage extends StatefulWidget {
|
||||||
|
final Order order;
|
||||||
|
|
||||||
|
const OrderDetailPage({super.key, required this.order});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<OrderDetailPage> createState() => _OrderDetailPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _OrderDetailPageState extends State<OrderDetailPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColor.white,
|
||||||
|
appBar: _buildAppBar(),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_buildOrderHeader(),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
_buildCustomerInfo(),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
_buildOrderItems(),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
_buildOrderSummary(),
|
||||||
|
if (widget.order.notes != null) ...[
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
_buildOrderNotes(),
|
||||||
|
],
|
||||||
|
const SizedBox(height: 32),
|
||||||
|
_buildActionButtons(),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferredSizeWidget _buildAppBar() {
|
||||||
|
return AppBar(
|
||||||
|
elevation: 0,
|
||||||
|
backgroundColor: AppColor.white,
|
||||||
|
leading: IconButton(
|
||||||
|
onPressed: () => context.router.back(),
|
||||||
|
icon: const Icon(Icons.arrow_back, color: AppColor.textPrimary),
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
'Detail Pesanan',
|
||||||
|
style: AppStyle.lg.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: _shareOrder,
|
||||||
|
icon: const Icon(Icons.share, color: AppColor.textSecondary),
|
||||||
|
),
|
||||||
|
PopupMenuButton<String>(
|
||||||
|
onSelected: _handleMenuAction,
|
||||||
|
icon: const Icon(Icons.more_vert, color: AppColor.textSecondary),
|
||||||
|
itemBuilder: (context) => [
|
||||||
|
const PopupMenuItem(
|
||||||
|
value: 'edit',
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.edit, size: 20),
|
||||||
|
SizedBox(width: 12),
|
||||||
|
Text('Edit Pesanan'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const PopupMenuItem(
|
||||||
|
value: 'duplicate',
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.content_copy, size: 20),
|
||||||
|
SizedBox(width: 12),
|
||||||
|
Text('Duplikat Pesanan'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const PopupMenuItem(
|
||||||
|
value: 'delete',
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.delete, size: 20, color: Colors.red),
|
||||||
|
SizedBox(width: 12),
|
||||||
|
Text('Hapus Pesanan', style: TextStyle(color: Colors.red)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildOrderHeader() {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.background,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: AppColor.border),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
widget.order.id,
|
||||||
|
style: AppStyle.lg.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_buildStatusBadge(widget.order.status),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.access_time, size: 16, color: AppColor.textSecondary),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
_formatDateTime(widget.order.orderDate),
|
||||||
|
style: AppStyle.sm.copyWith(color: AppColor.textSecondary),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildStatusBadge(OrderStatus status) {
|
||||||
|
Color backgroundColor;
|
||||||
|
Color textColor;
|
||||||
|
String text;
|
||||||
|
|
||||||
|
switch (status) {
|
||||||
|
case OrderStatus.pending:
|
||||||
|
backgroundColor = Colors.orange.withOpacity(0.1);
|
||||||
|
textColor = Colors.orange;
|
||||||
|
text = 'Menunggu';
|
||||||
|
break;
|
||||||
|
case OrderStatus.processing:
|
||||||
|
backgroundColor = Colors.blue.withOpacity(0.1);
|
||||||
|
textColor = Colors.blue;
|
||||||
|
text = 'Diproses';
|
||||||
|
break;
|
||||||
|
case OrderStatus.completed:
|
||||||
|
backgroundColor = Colors.green.withOpacity(0.1);
|
||||||
|
textColor = Colors.green;
|
||||||
|
text = 'Selesai';
|
||||||
|
break;
|
||||||
|
case OrderStatus.cancelled:
|
||||||
|
backgroundColor = Colors.red.withOpacity(0.1);
|
||||||
|
textColor = Colors.red;
|
||||||
|
text = 'Dibatalkan';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: backgroundColor,
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
text,
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: textColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildCustomerInfo() {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.background,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: AppColor.border),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Informasi Pelanggan',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
_buildInfoRow(
|
||||||
|
icon: Icons.person,
|
||||||
|
label: 'Nama',
|
||||||
|
value: widget.order.customerName,
|
||||||
|
),
|
||||||
|
if (widget.order.phoneNumber != null) ...[
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
_buildInfoRow(
|
||||||
|
icon: Icons.phone,
|
||||||
|
label: 'Telepon',
|
||||||
|
value: widget.order.phoneNumber!,
|
||||||
|
isClickable: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
if (widget.order.address != null) ...[
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
_buildInfoRow(
|
||||||
|
icon: Icons.location_on,
|
||||||
|
label: 'Alamat',
|
||||||
|
value: widget.order.address!,
|
||||||
|
isMultiline: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildInfoRow({
|
||||||
|
required IconData icon,
|
||||||
|
required String label,
|
||||||
|
required String value,
|
||||||
|
bool isClickable = false,
|
||||||
|
bool isMultiline = false,
|
||||||
|
}) {
|
||||||
|
return Row(
|
||||||
|
crossAxisAlignment: isMultiline
|
||||||
|
? CrossAxisAlignment.start
|
||||||
|
: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.primary.withOpacity(0.1),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Icon(icon, size: 18, color: AppColor.primary),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
style: AppStyle.xs.copyWith(
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 2),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: isClickable ? () => _callCustomer(value) : null,
|
||||||
|
child: Text(
|
||||||
|
value,
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
color: isClickable
|
||||||
|
? AppColor.primary
|
||||||
|
: AppColor.textPrimary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
decoration: isClickable ? TextDecoration.underline : null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildOrderItems() {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.background,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: AppColor.border),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Item Pesanan',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
...widget.order.items.asMap().entries.map((entry) {
|
||||||
|
final index = entry.key;
|
||||||
|
final item = entry.value;
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
if (index > 0)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
|
child: Divider(color: AppColor.border, height: 1),
|
||||||
|
),
|
||||||
|
_buildOrderItem(item),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildOrderItem(OrderItem item) {
|
||||||
|
return Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 60,
|
||||||
|
height: 60,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.primary.withOpacity(0.1),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: item.imageUrl != null
|
||||||
|
? ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
child: Image.network(
|
||||||
|
item.imageUrl!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
errorBuilder: (context, error, stackTrace) {
|
||||||
|
return Icon(
|
||||||
|
Icons.restaurant,
|
||||||
|
color: AppColor.primary,
|
||||||
|
size: 24,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Icon(Icons.restaurant, color: AppColor.primary, size: 24),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
item.name,
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
'Rp ${_formatCurrency(item.price)} x ${item.quantity}',
|
||||||
|
style: AppStyle.sm.copyWith(color: AppColor.textSecondary),
|
||||||
|
),
|
||||||
|
if (item.notes != null) ...[
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
'Catatan: ${item.notes}',
|
||||||
|
style: AppStyle.xs.copyWith(
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
fontStyle: FontStyle.italic,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'Rp ${_formatCurrency(item.price * item.quantity)}',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildOrderSummary() {
|
||||||
|
final subtotal = widget.order.items.fold<double>(
|
||||||
|
0,
|
||||||
|
(sum, item) => sum + (item.price * item.quantity),
|
||||||
|
);
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.background,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: AppColor.border),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Ringkasan Pesanan',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
_buildSummaryRow('Subtotal', subtotal),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
_buildSummaryRow('Ongkos Kirim', 10000),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
_buildSummaryRow('Pajak', subtotal * 0.1),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Divider(color: AppColor.border, height: 1),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
_buildSummaryRow('Total', widget.order.totalAmount, isBold: true),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildSummaryRow(String label, double amount, {bool isBold = false}) {
|
||||||
|
return Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
fontWeight: isBold ? FontWeight.bold : FontWeight.normal,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'Rp ${_formatCurrency(amount)}',
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
color: isBold ? AppColor.textPrimary : AppColor.textSecondary,
|
||||||
|
fontWeight: isBold ? FontWeight.bold : FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildOrderNotes() {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.background,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: AppColor.border),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.note, size: 18, color: AppColor.primary),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
'Catatan Pesanan',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: AppColor.border),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
widget.order.notes!,
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
height: 1.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildActionButtons() {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
if (widget.order.status == OrderStatus.pending) ...[
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: OutlinedButton.icon(
|
||||||
|
onPressed: _cancelOrder,
|
||||||
|
icon: const Icon(Icons.cancel, size: 20),
|
||||||
|
label: const Text('Batalkan'),
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
foregroundColor: Colors.red,
|
||||||
|
side: const BorderSide(color: Colors.red),
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Expanded(
|
||||||
|
child: ElevatedButton.icon(
|
||||||
|
onPressed: _processOrder,
|
||||||
|
icon: const Icon(Icons.check, size: 20),
|
||||||
|
label: const Text('Proses'),
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: AppColor.primary,
|
||||||
|
foregroundColor: AppColor.white,
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
] else if (widget.order.status == OrderStatus.processing) ...[
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: ElevatedButton.icon(
|
||||||
|
onPressed: _completeOrder,
|
||||||
|
icon: const Icon(Icons.check_circle, size: 20),
|
||||||
|
label: const Text('Selesaikan Pesanan'),
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
foregroundColor: AppColor.white,
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: OutlinedButton.icon(
|
||||||
|
onPressed: _contactCustomer,
|
||||||
|
icon: const Icon(Icons.chat, size: 20),
|
||||||
|
label: const Text('Hubungi Pelanggan'),
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
foregroundColor: AppColor.primary,
|
||||||
|
side: BorderSide(color: AppColor.primary),
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String _formatDateTime(DateTime dateTime) {
|
||||||
|
final months = [
|
||||||
|
'Jan',
|
||||||
|
'Feb',
|
||||||
|
'Mar',
|
||||||
|
'Apr',
|
||||||
|
'Mei',
|
||||||
|
'Jun',
|
||||||
|
'Jul',
|
||||||
|
'Ags',
|
||||||
|
'Sep',
|
||||||
|
'Okt',
|
||||||
|
'Nov',
|
||||||
|
'Des',
|
||||||
|
];
|
||||||
|
|
||||||
|
final day = dateTime.day;
|
||||||
|
final month = months[dateTime.month - 1];
|
||||||
|
final year = dateTime.year;
|
||||||
|
final hour = dateTime.hour.toString().padLeft(2, '0');
|
||||||
|
final minute = dateTime.minute.toString().padLeft(2, '0');
|
||||||
|
|
||||||
|
return '$day $month $year, $hour:$minute WIB';
|
||||||
|
}
|
||||||
|
|
||||||
|
String _formatCurrency(double amount) {
|
||||||
|
return amount
|
||||||
|
.toStringAsFixed(0)
|
||||||
|
.replaceAllMapped(
|
||||||
|
RegExp(r'(\d)(?=(\d{3})+(?!\d))'),
|
||||||
|
(Match m) => '${m[1]}.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _shareOrder() {
|
||||||
|
// Implement share functionality
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Fitur berbagi akan segera hadir'),
|
||||||
|
backgroundColor: AppColor.primary,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleMenuAction(String action) {
|
||||||
|
switch (action) {
|
||||||
|
case 'edit':
|
||||||
|
_editOrder();
|
||||||
|
break;
|
||||||
|
case 'duplicate':
|
||||||
|
_duplicateOrder();
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
_deleteOrder();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _editOrder() {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Fitur edit pesanan akan segera hadir'),
|
||||||
|
backgroundColor: AppColor.primary,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _duplicateOrder() {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Pesanan berhasil diduplikat'),
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deleteOrder() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
'Hapus Pesanan',
|
||||||
|
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
content: Text(
|
||||||
|
'Apakah Anda yakin ingin menghapus pesanan ${widget.order.id}? Tindakan ini tidak dapat dibatalkan.',
|
||||||
|
style: AppStyle.md,
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
child: Text(
|
||||||
|
'Batal',
|
||||||
|
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
context.router.back();
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Pesanan berhasil dihapus'),
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
),
|
||||||
|
child: const Text('Hapus'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _processOrder() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
'Proses Pesanan',
|
||||||
|
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
content: Text(
|
||||||
|
'Apakah Anda yakin ingin memproses pesanan ${widget.order.id}?',
|
||||||
|
style: AppStyle.md,
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
child: Text(
|
||||||
|
'Batal',
|
||||||
|
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Pesanan sedang diproses'),
|
||||||
|
backgroundColor: Colors.blue,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: AppColor.primary,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
),
|
||||||
|
child: const Text('Proses'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _completeOrder() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
'Selesaikan Pesanan',
|
||||||
|
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
content: Text(
|
||||||
|
'Apakah pesanan ${widget.order.id} sudah selesai dan siap dikirim?',
|
||||||
|
style: AppStyle.md,
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
child: Text(
|
||||||
|
'Belum',
|
||||||
|
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Pesanan berhasil diselesaikan'),
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
),
|
||||||
|
child: const Text('Selesai'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _cancelOrder() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
'Batalkan Pesanan',
|
||||||
|
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
content: Text(
|
||||||
|
'Apakah Anda yakin ingin membatalkan pesanan ${widget.order.id}?',
|
||||||
|
style: AppStyle.md,
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
child: Text(
|
||||||
|
'Tidak',
|
||||||
|
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Pesanan berhasil dibatalkan'),
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
),
|
||||||
|
child: const Text('Batalkan'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _contactCustomer() {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
backgroundColor: AppColor.white,
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
|
||||||
|
),
|
||||||
|
builder: (context) => Container(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 40,
|
||||||
|
height: 4,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.border,
|
||||||
|
borderRadius: BorderRadius.circular(2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
'Hubungi ${widget.order.customerName}',
|
||||||
|
style: AppStyle.lg.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
if (widget.order.phoneNumber != null)
|
||||||
|
ListTile(
|
||||||
|
leading: Container(
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.green.withOpacity(0.1),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: const Icon(Icons.phone, color: Colors.green),
|
||||||
|
),
|
||||||
|
title: const Text('Telepon'),
|
||||||
|
subtitle: Text(widget.order.phoneNumber!),
|
||||||
|
onTap: () => _callCustomer(widget.order.phoneNumber!),
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
leading: Container(
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.blue.withOpacity(0.1),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: const Icon(Icons.chat, color: Colors.blue),
|
||||||
|
),
|
||||||
|
title: const Text('Kirim Pesan'),
|
||||||
|
subtitle: const Text('Via WhatsApp'),
|
||||||
|
onTap: () => _sendMessage(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _callCustomer(String phoneNumber) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Menghubungi $phoneNumber...'),
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _sendMessage() {
|
||||||
|
Navigator.pop(context);
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Membuka WhatsApp...'),
|
||||||
|
backgroundColor: Colors.blue,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,299 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../../common/theme/theme.dart';
|
||||||
|
|
||||||
|
@RoutePage()
|
||||||
|
class VoucherDetailPage extends StatelessWidget {
|
||||||
|
const VoucherDetailPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColor.background,
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text(
|
||||||
|
'Detail Voucher',
|
||||||
|
style: AppStyle.xl.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: AppColor.backgroundLight,
|
||||||
|
elevation: 0,
|
||||||
|
iconTheme: IconThemeData(color: AppColor.textPrimary),
|
||||||
|
bottom: PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(1),
|
||||||
|
child: Container(height: 1, color: AppColor.borderLight),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Voucher Card Section
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(16),
|
||||||
|
padding: EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: AppColor.primaryGradient,
|
||||||
|
begin: Alignment.topLeft,
|
||||||
|
end: Alignment.bottomRight,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: AppColor.primary.withOpacity(0.3),
|
||||||
|
offset: Offset(0, 4),
|
||||||
|
blurRadius: 12,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Voucher Icon
|
||||||
|
Container(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.white.withOpacity(0.2),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.local_offer,
|
||||||
|
color: AppColor.white,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
|
||||||
|
// Title
|
||||||
|
Text(
|
||||||
|
'New User Voucher - Diskon 50% hingga Rp35K',
|
||||||
|
style: AppStyle.xl.copyWith(
|
||||||
|
color: AppColor.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
|
||||||
|
// Subtitle
|
||||||
|
Text(
|
||||||
|
'Tanpa Min. Belanja',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
color: AppColor.white.withOpacity(0.9),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 20),
|
||||||
|
|
||||||
|
// Voucher Details Row
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: _buildDetailItem(
|
||||||
|
icon: Icons.schedule,
|
||||||
|
label: 'Berlaku hingga',
|
||||||
|
value: '25 Sep 2025',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 1,
|
||||||
|
height: 40,
|
||||||
|
color: AppColor.white.withOpacity(0.3),
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: _buildDetailItem(
|
||||||
|
icon: Icons.shopping_cart,
|
||||||
|
label: 'Min. Transaksi',
|
||||||
|
value: '-',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Action Buttons
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ElevatedButton.icon(
|
||||||
|
onPressed: () {
|
||||||
|
// Copy voucher code functionality
|
||||||
|
_copyVoucherCode(context);
|
||||||
|
},
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: AppColor.backgroundLight,
|
||||||
|
foregroundColor: AppColor.primary,
|
||||||
|
elevation: 0,
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
side: BorderSide(color: AppColor.border),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
icon: Icon(Icons.copy, size: 20),
|
||||||
|
label: Text(
|
||||||
|
'Salin Kode',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 12),
|
||||||
|
Expanded(
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
// Use voucher functionality
|
||||||
|
_useVoucher(context);
|
||||||
|
},
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: AppColor.primary,
|
||||||
|
foregroundColor: AppColor.white,
|
||||||
|
elevation: 0,
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'Gunakan',
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 24),
|
||||||
|
|
||||||
|
// Description Section
|
||||||
|
_buildSection(
|
||||||
|
title: 'Deskripsi',
|
||||||
|
content:
|
||||||
|
'Dapatkan diskon hingga 50% untuk pembelian pertama Anda! Voucher ini khusus untuk pengguna baru dan berlaku untuk semua kategori produk tanpa minimum pembelian.',
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
|
||||||
|
// Terms and Conditions Section
|
||||||
|
_buildSection(
|
||||||
|
title: 'Syarat dan Ketentuan',
|
||||||
|
content: _getDefaultTermsAndConditions(),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 24),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildDetailItem({
|
||||||
|
required IconData icon,
|
||||||
|
required String label,
|
||||||
|
required String value,
|
||||||
|
}) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(icon, size: 16, color: AppColor.white.withOpacity(0.8)),
|
||||||
|
SizedBox(width: 4),
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
style: AppStyle.xs.copyWith(
|
||||||
|
color: AppColor.white.withOpacity(0.8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
value,
|
||||||
|
style: AppStyle.sm.copyWith(
|
||||||
|
color: AppColor.white,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildSection({required String title, required String content}) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
padding: EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.backgroundLight,
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
border: Border.all(color: AppColor.borderLight),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: AppStyle.lg.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 12),
|
||||||
|
Text(
|
||||||
|
content,
|
||||||
|
style: AppStyle.md.copyWith(
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
height: 1.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _copyVoucherCode(BuildContext context) {
|
||||||
|
// Implementation for copying voucher code
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
'Kode voucher berhasil disalin!',
|
||||||
|
style: AppStyle.md.copyWith(color: AppColor.white),
|
||||||
|
),
|
||||||
|
backgroundColor: AppColor.success,
|
||||||
|
behavior: SnackBarBehavior.floating,
|
||||||
|
margin: EdgeInsets.all(16),
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _useVoucher(BuildContext context) {
|
||||||
|
// Implementation for using voucher
|
||||||
|
// Navigate back to checkout or shopping cart
|
||||||
|
context.router.back(); // Return true to indicate voucher was selected
|
||||||
|
}
|
||||||
|
|
||||||
|
String _getDefaultTermsAndConditions() {
|
||||||
|
return '''• Voucher hanya berlaku untuk pengguna baru
|
||||||
|
• Tidak dapat digabungkan dengan promo lain
|
||||||
|
• Berlaku untuk semua kategori produk
|
||||||
|
• Voucher tidak dapat diuangkan
|
||||||
|
• Voucher akan hangus jika tidak digunakan sebelum tanggal expired
|
||||||
|
• Satu voucher hanya berlaku untuk satu kali transaksi
|
||||||
|
• Voucher tidak berlaku untuk produk yang sudah didiskon
|
||||||
|
• Kebijakan voucher dapat berubah sewaktu-waktu''';
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -41,5 +41,14 @@ class AppRouter extends RootStackRouter {
|
|||||||
// Draw
|
// Draw
|
||||||
AutoRoute(page: DrawRoute.page),
|
AutoRoute(page: DrawRoute.page),
|
||||||
AutoRoute(page: DrawDetailRoute.page),
|
AutoRoute(page: DrawDetailRoute.page),
|
||||||
|
|
||||||
|
// Voucher
|
||||||
|
AutoRoute(page: VoucherDetailRoute.page),
|
||||||
|
|
||||||
|
// Notification
|
||||||
|
AutoRoute(page: NotificationRoute.page),
|
||||||
|
|
||||||
|
// Order
|
||||||
|
AutoRoute(page: OrderDetailRoute.page),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,16 +9,16 @@
|
|||||||
// coverage:ignore-file
|
// coverage:ignore-file
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'package:auto_route/auto_route.dart' as _i20;
|
import 'package:auto_route/auto_route.dart' as _i23;
|
||||||
import 'package:enaklo/presentation/pages/auth/create_password/create_password_page.dart'
|
import 'package:enaklo/presentation/pages/auth/create_password/create_password_page.dart'
|
||||||
as _i1;
|
as _i1;
|
||||||
import 'package:enaklo/presentation/pages/auth/login/login_page.dart' as _i5;
|
import 'package:enaklo/presentation/pages/auth/login/login_page.dart' as _i5;
|
||||||
import 'package:enaklo/presentation/pages/auth/otp/otp_page.dart' as _i11;
|
import 'package:enaklo/presentation/pages/auth/otp/otp_page.dart' as _i13;
|
||||||
import 'package:enaklo/presentation/pages/auth/password/password_page.dart'
|
import 'package:enaklo/presentation/pages/auth/password/password_page.dart'
|
||||||
as _i12;
|
as _i14;
|
||||||
import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i13;
|
import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i15;
|
||||||
import 'package:enaklo/presentation/pages/auth/register/register_page.dart'
|
import 'package:enaklo/presentation/pages/auth/register/register_page.dart'
|
||||||
as _i16;
|
as _i18;
|
||||||
import 'package:enaklo/presentation/pages/draw/draw_page.dart' as _i3;
|
import 'package:enaklo/presentation/pages/draw/draw_page.dart' as _i3;
|
||||||
import 'package:enaklo/presentation/pages/draw/pages/draw_detail/draw_detail_page.dart'
|
import 'package:enaklo/presentation/pages/draw/pages/draw_detail/draw_detail_page.dart'
|
||||||
as _i2;
|
as _i2;
|
||||||
@ -26,31 +26,37 @@ import 'package:enaklo/presentation/pages/main/main_page.dart' as _i6;
|
|||||||
import 'package:enaklo/presentation/pages/main/pages/home/home_page.dart'
|
import 'package:enaklo/presentation/pages/main/pages/home/home_page.dart'
|
||||||
as _i4;
|
as _i4;
|
||||||
import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart'
|
import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart'
|
||||||
as _i10;
|
as _i12;
|
||||||
import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart'
|
import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart'
|
||||||
as _i15;
|
as _i17;
|
||||||
import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart'
|
import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart'
|
||||||
as _i19;
|
as _i22;
|
||||||
import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i8;
|
import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i8;
|
||||||
import 'package:enaklo/presentation/pages/merchant/pages/merchant_detail/merchant_detail_page.dart'
|
import 'package:enaklo/presentation/pages/merchant/pages/merchant_detail/merchant_detail_page.dart'
|
||||||
as _i7;
|
as _i7;
|
||||||
import 'package:enaklo/presentation/pages/onboarding/onboarding_page.dart'
|
import 'package:enaklo/presentation/pages/notification/notification_page.dart'
|
||||||
as _i9;
|
as _i9;
|
||||||
|
import 'package:enaklo/presentation/pages/onboarding/onboarding_page.dart'
|
||||||
|
as _i10;
|
||||||
|
import 'package:enaklo/presentation/pages/order/order_detail/order_detail_page.dart'
|
||||||
|
as _i11;
|
||||||
import 'package:enaklo/presentation/pages/reward/pages/product_redeem/product_redeem_page.dart'
|
import 'package:enaklo/presentation/pages/reward/pages/product_redeem/product_redeem_page.dart'
|
||||||
as _i14;
|
as _i16;
|
||||||
import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i17;
|
import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i19;
|
||||||
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i18;
|
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i20;
|
||||||
import 'package:flutter/material.dart' as _i21;
|
import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart'
|
||||||
|
as _i21;
|
||||||
|
import 'package:flutter/material.dart' as _i24;
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i1.CreatePasswordPage]
|
/// [_i1.CreatePasswordPage]
|
||||||
class CreatePasswordRoute extends _i20.PageRouteInfo<void> {
|
class CreatePasswordRoute extends _i23.PageRouteInfo<void> {
|
||||||
const CreatePasswordRoute({List<_i20.PageRouteInfo>? children})
|
const CreatePasswordRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(CreatePasswordRoute.name, initialChildren: children);
|
: super(CreatePasswordRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'CreatePasswordRoute';
|
static const String name = 'CreatePasswordRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i1.CreatePasswordPage();
|
return const _i1.CreatePasswordPage();
|
||||||
@ -60,11 +66,11 @@ class CreatePasswordRoute extends _i20.PageRouteInfo<void> {
|
|||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i2.DrawDetailPage]
|
/// [_i2.DrawDetailPage]
|
||||||
class DrawDetailRoute extends _i20.PageRouteInfo<DrawDetailRouteArgs> {
|
class DrawDetailRoute extends _i23.PageRouteInfo<DrawDetailRouteArgs> {
|
||||||
DrawDetailRoute({
|
DrawDetailRoute({
|
||||||
_i21.Key? key,
|
_i24.Key? key,
|
||||||
required _i3.DrawEvent drawEvent,
|
required _i3.DrawEvent drawEvent,
|
||||||
List<_i20.PageRouteInfo>? children,
|
List<_i23.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
DrawDetailRoute.name,
|
DrawDetailRoute.name,
|
||||||
args: DrawDetailRouteArgs(key: key, drawEvent: drawEvent),
|
args: DrawDetailRouteArgs(key: key, drawEvent: drawEvent),
|
||||||
@ -73,7 +79,7 @@ class DrawDetailRoute extends _i20.PageRouteInfo<DrawDetailRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'DrawDetailRoute';
|
static const String name = 'DrawDetailRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final args = data.argsAs<DrawDetailRouteArgs>();
|
final args = data.argsAs<DrawDetailRouteArgs>();
|
||||||
@ -85,7 +91,7 @@ class DrawDetailRoute extends _i20.PageRouteInfo<DrawDetailRouteArgs> {
|
|||||||
class DrawDetailRouteArgs {
|
class DrawDetailRouteArgs {
|
||||||
const DrawDetailRouteArgs({this.key, required this.drawEvent});
|
const DrawDetailRouteArgs({this.key, required this.drawEvent});
|
||||||
|
|
||||||
final _i21.Key? key;
|
final _i24.Key? key;
|
||||||
|
|
||||||
final _i3.DrawEvent drawEvent;
|
final _i3.DrawEvent drawEvent;
|
||||||
|
|
||||||
@ -97,13 +103,13 @@ class DrawDetailRouteArgs {
|
|||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i3.DrawPage]
|
/// [_i3.DrawPage]
|
||||||
class DrawRoute extends _i20.PageRouteInfo<void> {
|
class DrawRoute extends _i23.PageRouteInfo<void> {
|
||||||
const DrawRoute({List<_i20.PageRouteInfo>? children})
|
const DrawRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(DrawRoute.name, initialChildren: children);
|
: super(DrawRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'DrawRoute';
|
static const String name = 'DrawRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i3.DrawPage();
|
return const _i3.DrawPage();
|
||||||
@ -113,13 +119,13 @@ class DrawRoute extends _i20.PageRouteInfo<void> {
|
|||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i4.HomePage]
|
/// [_i4.HomePage]
|
||||||
class HomeRoute extends _i20.PageRouteInfo<void> {
|
class HomeRoute extends _i23.PageRouteInfo<void> {
|
||||||
const HomeRoute({List<_i20.PageRouteInfo>? children})
|
const HomeRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(HomeRoute.name, initialChildren: children);
|
: super(HomeRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'HomeRoute';
|
static const String name = 'HomeRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i4.HomePage();
|
return const _i4.HomePage();
|
||||||
@ -129,13 +135,13 @@ class HomeRoute extends _i20.PageRouteInfo<void> {
|
|||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i5.LoginPage]
|
/// [_i5.LoginPage]
|
||||||
class LoginRoute extends _i20.PageRouteInfo<void> {
|
class LoginRoute extends _i23.PageRouteInfo<void> {
|
||||||
const LoginRoute({List<_i20.PageRouteInfo>? children})
|
const LoginRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(LoginRoute.name, initialChildren: children);
|
: super(LoginRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'LoginRoute';
|
static const String name = 'LoginRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i5.LoginPage();
|
return const _i5.LoginPage();
|
||||||
@ -145,13 +151,13 @@ class LoginRoute extends _i20.PageRouteInfo<void> {
|
|||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i6.MainPage]
|
/// [_i6.MainPage]
|
||||||
class MainRoute extends _i20.PageRouteInfo<void> {
|
class MainRoute extends _i23.PageRouteInfo<void> {
|
||||||
const MainRoute({List<_i20.PageRouteInfo>? children})
|
const MainRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(MainRoute.name, initialChildren: children);
|
: super(MainRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'MainRoute';
|
static const String name = 'MainRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i6.MainPage();
|
return const _i6.MainPage();
|
||||||
@ -161,11 +167,11 @@ class MainRoute extends _i20.PageRouteInfo<void> {
|
|||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i7.MerchantDetailPage]
|
/// [_i7.MerchantDetailPage]
|
||||||
class MerchantDetailRoute extends _i20.PageRouteInfo<MerchantDetailRouteArgs> {
|
class MerchantDetailRoute extends _i23.PageRouteInfo<MerchantDetailRouteArgs> {
|
||||||
MerchantDetailRoute({
|
MerchantDetailRoute({
|
||||||
_i21.Key? key,
|
_i24.Key? key,
|
||||||
required _i8.MerchantModel merchant,
|
required _i8.MerchantModel merchant,
|
||||||
List<_i20.PageRouteInfo>? children,
|
List<_i23.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
MerchantDetailRoute.name,
|
MerchantDetailRoute.name,
|
||||||
args: MerchantDetailRouteArgs(key: key, merchant: merchant),
|
args: MerchantDetailRouteArgs(key: key, merchant: merchant),
|
||||||
@ -174,7 +180,7 @@ class MerchantDetailRoute extends _i20.PageRouteInfo<MerchantDetailRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'MerchantDetailRoute';
|
static const String name = 'MerchantDetailRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final args = data.argsAs<MerchantDetailRouteArgs>();
|
final args = data.argsAs<MerchantDetailRouteArgs>();
|
||||||
@ -186,7 +192,7 @@ class MerchantDetailRoute extends _i20.PageRouteInfo<MerchantDetailRouteArgs> {
|
|||||||
class MerchantDetailRouteArgs {
|
class MerchantDetailRouteArgs {
|
||||||
const MerchantDetailRouteArgs({this.key, required this.merchant});
|
const MerchantDetailRouteArgs({this.key, required this.merchant});
|
||||||
|
|
||||||
final _i21.Key? key;
|
final _i24.Key? key;
|
||||||
|
|
||||||
final _i8.MerchantModel merchant;
|
final _i8.MerchantModel merchant;
|
||||||
|
|
||||||
@ -198,13 +204,13 @@ class MerchantDetailRouteArgs {
|
|||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i8.MerchantPage]
|
/// [_i8.MerchantPage]
|
||||||
class MerchantRoute extends _i20.PageRouteInfo<void> {
|
class MerchantRoute extends _i23.PageRouteInfo<void> {
|
||||||
const MerchantRoute({List<_i20.PageRouteInfo>? children})
|
const MerchantRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(MerchantRoute.name, initialChildren: children);
|
: super(MerchantRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'MerchantRoute';
|
static const String name = 'MerchantRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i8.MerchantPage();
|
return const _i8.MerchantPage();
|
||||||
@ -213,77 +219,130 @@ class MerchantRoute extends _i20.PageRouteInfo<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i9.OnboardingPage]
|
/// [_i9.NotificationPage]
|
||||||
class OnboardingRoute extends _i20.PageRouteInfo<void> {
|
class NotificationRoute extends _i23.PageRouteInfo<void> {
|
||||||
const OnboardingRoute({List<_i20.PageRouteInfo>? children})
|
const NotificationRoute({List<_i23.PageRouteInfo>? children})
|
||||||
|
: super(NotificationRoute.name, initialChildren: children);
|
||||||
|
|
||||||
|
static const String name = 'NotificationRoute';
|
||||||
|
|
||||||
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
|
name,
|
||||||
|
builder: (data) {
|
||||||
|
return const _i9.NotificationPage();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// generated route for
|
||||||
|
/// [_i10.OnboardingPage]
|
||||||
|
class OnboardingRoute extends _i23.PageRouteInfo<void> {
|
||||||
|
const OnboardingRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(OnboardingRoute.name, initialChildren: children);
|
: super(OnboardingRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'OnboardingRoute';
|
static const String name = 'OnboardingRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i9.OnboardingPage();
|
return const _i10.OnboardingPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i10.OrderPage]
|
/// [_i11.OrderDetailPage]
|
||||||
class OrderRoute extends _i20.PageRouteInfo<void> {
|
class OrderDetailRoute extends _i23.PageRouteInfo<OrderDetailRouteArgs> {
|
||||||
const OrderRoute({List<_i20.PageRouteInfo>? children})
|
OrderDetailRoute({
|
||||||
|
_i24.Key? key,
|
||||||
|
required _i12.Order order,
|
||||||
|
List<_i23.PageRouteInfo>? children,
|
||||||
|
}) : super(
|
||||||
|
OrderDetailRoute.name,
|
||||||
|
args: OrderDetailRouteArgs(key: key, order: order),
|
||||||
|
initialChildren: children,
|
||||||
|
);
|
||||||
|
|
||||||
|
static const String name = 'OrderDetailRoute';
|
||||||
|
|
||||||
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
|
name,
|
||||||
|
builder: (data) {
|
||||||
|
final args = data.argsAs<OrderDetailRouteArgs>();
|
||||||
|
return _i11.OrderDetailPage(key: args.key, order: args.order);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class OrderDetailRouteArgs {
|
||||||
|
const OrderDetailRouteArgs({this.key, required this.order});
|
||||||
|
|
||||||
|
final _i24.Key? key;
|
||||||
|
|
||||||
|
final _i12.Order order;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'OrderDetailRouteArgs{key: $key, order: $order}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// generated route for
|
||||||
|
/// [_i12.OrderPage]
|
||||||
|
class OrderRoute extends _i23.PageRouteInfo<void> {
|
||||||
|
const OrderRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(OrderRoute.name, initialChildren: children);
|
: super(OrderRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'OrderRoute';
|
static const String name = 'OrderRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i10.OrderPage();
|
return const _i12.OrderPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i11.OtpPage]
|
/// [_i13.OtpPage]
|
||||||
class OtpRoute extends _i20.PageRouteInfo<void> {
|
class OtpRoute extends _i23.PageRouteInfo<void> {
|
||||||
const OtpRoute({List<_i20.PageRouteInfo>? children})
|
const OtpRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(OtpRoute.name, initialChildren: children);
|
: super(OtpRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'OtpRoute';
|
static const String name = 'OtpRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i11.OtpPage();
|
return const _i13.OtpPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i12.PasswordPage]
|
/// [_i14.PasswordPage]
|
||||||
class PasswordRoute extends _i20.PageRouteInfo<void> {
|
class PasswordRoute extends _i23.PageRouteInfo<void> {
|
||||||
const PasswordRoute({List<_i20.PageRouteInfo>? children})
|
const PasswordRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(PasswordRoute.name, initialChildren: children);
|
: super(PasswordRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'PasswordRoute';
|
static const String name = 'PasswordRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i12.PasswordPage();
|
return const _i14.PasswordPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i13.PinPage]
|
/// [_i15.PinPage]
|
||||||
class PinRoute extends _i20.PageRouteInfo<PinRouteArgs> {
|
class PinRoute extends _i23.PageRouteInfo<PinRouteArgs> {
|
||||||
PinRoute({
|
PinRoute({
|
||||||
_i21.Key? key,
|
_i24.Key? key,
|
||||||
bool isCreatePin = true,
|
bool isCreatePin = true,
|
||||||
String? title,
|
String? title,
|
||||||
List<_i20.PageRouteInfo>? children,
|
List<_i23.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
PinRoute.name,
|
PinRoute.name,
|
||||||
args: PinRouteArgs(key: key, isCreatePin: isCreatePin, title: title),
|
args: PinRouteArgs(key: key, isCreatePin: isCreatePin, title: title),
|
||||||
@ -292,13 +351,13 @@ class PinRoute extends _i20.PageRouteInfo<PinRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'PinRoute';
|
static const String name = 'PinRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final args = data.argsAs<PinRouteArgs>(
|
final args = data.argsAs<PinRouteArgs>(
|
||||||
orElse: () => const PinRouteArgs(),
|
orElse: () => const PinRouteArgs(),
|
||||||
);
|
);
|
||||||
return _i13.PinPage(
|
return _i15.PinPage(
|
||||||
key: args.key,
|
key: args.key,
|
||||||
isCreatePin: args.isCreatePin,
|
isCreatePin: args.isCreatePin,
|
||||||
title: args.title,
|
title: args.title,
|
||||||
@ -310,7 +369,7 @@ class PinRoute extends _i20.PageRouteInfo<PinRouteArgs> {
|
|||||||
class PinRouteArgs {
|
class PinRouteArgs {
|
||||||
const PinRouteArgs({this.key, this.isCreatePin = true, this.title});
|
const PinRouteArgs({this.key, this.isCreatePin = true, this.title});
|
||||||
|
|
||||||
final _i21.Key? key;
|
final _i24.Key? key;
|
||||||
|
|
||||||
final bool isCreatePin;
|
final bool isCreatePin;
|
||||||
|
|
||||||
@ -323,14 +382,14 @@ class PinRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i14.ProductRedeemPage]
|
/// [_i16.ProductRedeemPage]
|
||||||
class ProductRedeemRoute extends _i20.PageRouteInfo<ProductRedeemRouteArgs> {
|
class ProductRedeemRoute extends _i23.PageRouteInfo<ProductRedeemRouteArgs> {
|
||||||
ProductRedeemRoute({
|
ProductRedeemRoute({
|
||||||
_i21.Key? key,
|
_i24.Key? key,
|
||||||
required _i17.Product product,
|
required _i19.Product product,
|
||||||
required _i17.Merchant merchant,
|
required _i19.Merchant merchant,
|
||||||
required _i17.PointCard pointCard,
|
required _i19.PointCard pointCard,
|
||||||
List<_i20.PageRouteInfo>? children,
|
List<_i23.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
ProductRedeemRoute.name,
|
ProductRedeemRoute.name,
|
||||||
args: ProductRedeemRouteArgs(
|
args: ProductRedeemRouteArgs(
|
||||||
@ -344,11 +403,11 @@ class ProductRedeemRoute extends _i20.PageRouteInfo<ProductRedeemRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'ProductRedeemRoute';
|
static const String name = 'ProductRedeemRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final args = data.argsAs<ProductRedeemRouteArgs>();
|
final args = data.argsAs<ProductRedeemRouteArgs>();
|
||||||
return _i14.ProductRedeemPage(
|
return _i16.ProductRedeemPage(
|
||||||
key: args.key,
|
key: args.key,
|
||||||
product: args.product,
|
product: args.product,
|
||||||
merchant: args.merchant,
|
merchant: args.merchant,
|
||||||
@ -366,13 +425,13 @@ class ProductRedeemRouteArgs {
|
|||||||
required this.pointCard,
|
required this.pointCard,
|
||||||
});
|
});
|
||||||
|
|
||||||
final _i21.Key? key;
|
final _i24.Key? key;
|
||||||
|
|
||||||
final _i17.Product product;
|
final _i19.Product product;
|
||||||
|
|
||||||
final _i17.Merchant merchant;
|
final _i19.Merchant merchant;
|
||||||
|
|
||||||
final _i17.PointCard pointCard;
|
final _i19.PointCard pointCard;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
@ -381,81 +440,97 @@ class ProductRedeemRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i15.ProfilePage]
|
/// [_i17.ProfilePage]
|
||||||
class ProfileRoute extends _i20.PageRouteInfo<void> {
|
class ProfileRoute extends _i23.PageRouteInfo<void> {
|
||||||
const ProfileRoute({List<_i20.PageRouteInfo>? children})
|
const ProfileRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(ProfileRoute.name, initialChildren: children);
|
: super(ProfileRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'ProfileRoute';
|
static const String name = 'ProfileRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i15.ProfilePage();
|
return const _i17.ProfilePage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i16.RegisterPage]
|
/// [_i18.RegisterPage]
|
||||||
class RegisterRoute extends _i20.PageRouteInfo<void> {
|
class RegisterRoute extends _i23.PageRouteInfo<void> {
|
||||||
const RegisterRoute({List<_i20.PageRouteInfo>? children})
|
const RegisterRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(RegisterRoute.name, initialChildren: children);
|
: super(RegisterRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'RegisterRoute';
|
static const String name = 'RegisterRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i16.RegisterPage();
|
return const _i18.RegisterPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i17.RewardPage]
|
/// [_i19.RewardPage]
|
||||||
class RewardRoute extends _i20.PageRouteInfo<void> {
|
class RewardRoute extends _i23.PageRouteInfo<void> {
|
||||||
const RewardRoute({List<_i20.PageRouteInfo>? children})
|
const RewardRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(RewardRoute.name, initialChildren: children);
|
: super(RewardRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'RewardRoute';
|
static const String name = 'RewardRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i17.RewardPage();
|
return const _i19.RewardPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i18.SplashPage]
|
/// [_i20.SplashPage]
|
||||||
class SplashRoute extends _i20.PageRouteInfo<void> {
|
class SplashRoute extends _i23.PageRouteInfo<void> {
|
||||||
const SplashRoute({List<_i20.PageRouteInfo>? children})
|
const SplashRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(SplashRoute.name, initialChildren: children);
|
: super(SplashRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'SplashRoute';
|
static const String name = 'SplashRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i18.SplashPage();
|
return const _i20.SplashPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i19.VoucherPage]
|
/// [_i21.VoucherDetailPage]
|
||||||
class VoucherRoute extends _i20.PageRouteInfo<void> {
|
class VoucherDetailRoute extends _i23.PageRouteInfo<void> {
|
||||||
const VoucherRoute({List<_i20.PageRouteInfo>? children})
|
const VoucherDetailRoute({List<_i23.PageRouteInfo>? children})
|
||||||
|
: super(VoucherDetailRoute.name, initialChildren: children);
|
||||||
|
|
||||||
|
static const String name = 'VoucherDetailRoute';
|
||||||
|
|
||||||
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
|
name,
|
||||||
|
builder: (data) {
|
||||||
|
return const _i21.VoucherDetailPage();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// generated route for
|
||||||
|
/// [_i22.VoucherPage]
|
||||||
|
class VoucherRoute extends _i23.PageRouteInfo<void> {
|
||||||
|
const VoucherRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(VoucherRoute.name, initialChildren: children);
|
: super(VoucherRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'VoucherRoute';
|
static const String name = 'VoucherRoute';
|
||||||
|
|
||||||
static _i20.PageInfo page = _i20.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i19.VoucherPage();
|
return const _i22.VoucherPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user