feat: voucher detail

This commit is contained in:
efrilm 2025-08-29 16:28:27 +07:00
parent 74d706b32a
commit 4dc56662c8
4 changed files with 574 additions and 246 deletions

View File

@ -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,188 +21,194 @@ class VoucherCard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return GestureDetector(
decoration: BoxDecoration( onTap: () => context.router.push(VoucherDetailRoute()),
boxShadow: [ child: Container(
BoxShadow( decoration: BoxDecoration(
color: Colors.black.withOpacity(0.08), boxShadow: [
blurRadius: 12, BoxShadow(
offset: Offset(0, 4), color: Colors.black.withOpacity(0.08),
spreadRadius: 0, blurRadius: 12,
), offset: Offset(0, 4),
BoxShadow( spreadRadius: 0,
color: Colors.black.withOpacity(0.04), ),
blurRadius: 6, BoxShadow(
offset: Offset(0, 2), color: Colors.black.withOpacity(0.04),
spreadRadius: 0, blurRadius: 6,
), offset: Offset(0, 2),
], spreadRadius: 0,
), ),
child: ClipPath( ],
clipper: VoucherClipper(), ),
child: Container( child: ClipPath(
decoration: BoxDecoration(color: Colors.white), clipper: VoucherClipper(),
child: Column( child: Container(
children: [ decoration: BoxDecoration(color: Colors.white),
// Main Content child: Column(
Padding( children: [
padding: EdgeInsets.all(16), // Main Content
child: Row( Padding(
children: [ padding: EdgeInsets.all(16),
Expanded( child: Row(
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Expanded(
children: [ child: Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
title, children: [
style: AppStyle.lg.copyWith( Text(
color: AppColor.textPrimary, title,
fontWeight: FontWeight.w600, style: AppStyle.lg.copyWith(
), color: AppColor.textPrimary,
), fontWeight: FontWeight.w600,
SizedBox(height: 4),
Text(
subtitle,
style: AppStyle.md.copyWith(
color: AppColor.textSecondary,
),
),
],
),
),
SizedBox(width: 12),
// Voucher Icon
Container(
width: 50,
height: 50,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.grey[300]!, width: 1),
),
child: Stack(
alignment: Alignment.center,
children: [
Icon(
Icons.local_offer_outlined,
color: AppColor.primary,
size: 24,
),
Positioned(
top: 6,
right: 6,
child: Container(
width: 16,
height: 16,
decoration: BoxDecoration(
color: AppColor.error,
shape: BoxShape.circle,
),
child: Icon(
Icons.percent,
color: Colors.white,
size: 10,
), ),
), ),
), SizedBox(height: 4),
], Text(
), subtitle,
), style: AppStyle.md.copyWith(
], color: AppColor.textSecondary,
), ),
),
// Dashed line divider
Container(
height: 1,
margin: EdgeInsets.symmetric(horizontal: 20),
child: CustomPaint(
size: Size(double.infinity, 1),
painter: DashedLinePainter(),
),
),
// Bottom Section
Padding(
padding: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Berlaku Hingga',
style: AppStyle.xs.copyWith(
color: AppColor.textSecondary,
fontSize: 10,
),
),
SizedBox(height: 2),
Text(
expireDate,
style: TextStyle(
color: AppColor.textPrimary,
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
],
), ),
), ],
SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Min Transaksi',
style: AppStyle.xs.copyWith(
color: AppColor.textSecondary,
fontSize: 10,
),
),
SizedBox(height: 2),
Text(
minTransaction,
style: AppStyle.md.copyWith(
color: AppColor.textPrimary,
fontWeight: FontWeight.w500,
),
),
],
),
),
],
),
),
SizedBox(width: 16),
// Pakai Button
Container(
padding: EdgeInsets.symmetric(
horizontal: 24,
vertical: 10,
),
decoration: BoxDecoration(
color: AppColor.primary,
borderRadius: BorderRadius.circular(20),
),
child: Text(
'Pakai',
style: TextStyle(
color: AppColor.white,
fontSize: 14,
fontWeight: FontWeight.w600,
), ),
), ),
), SizedBox(width: 12),
], // Voucher Icon
Container(
width: 50,
height: 50,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: Colors.grey[300]!,
width: 1,
),
),
child: Stack(
alignment: Alignment.center,
children: [
Icon(
Icons.local_offer_outlined,
color: AppColor.primary,
size: 24,
),
Positioned(
top: 6,
right: 6,
child: Container(
width: 16,
height: 16,
decoration: BoxDecoration(
color: AppColor.error,
shape: BoxShape.circle,
),
child: Icon(
Icons.percent,
color: Colors.white,
size: 10,
),
),
),
],
),
),
],
),
), ),
),
], // Dashed line divider
Container(
height: 1,
margin: EdgeInsets.symmetric(horizontal: 20),
child: CustomPaint(
size: Size(double.infinity, 1),
painter: DashedLinePainter(),
),
),
// Bottom Section
Padding(
padding: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Berlaku Hingga',
style: AppStyle.xs.copyWith(
color: AppColor.textSecondary,
fontSize: 10,
),
),
SizedBox(height: 2),
Text(
expireDate,
style: TextStyle(
color: AppColor.textPrimary,
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
],
),
),
SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Min Transaksi',
style: AppStyle.xs.copyWith(
color: AppColor.textSecondary,
fontSize: 10,
),
),
SizedBox(height: 2),
Text(
minTransaction,
style: AppStyle.md.copyWith(
color: AppColor.textPrimary,
fontWeight: FontWeight.w500,
),
),
],
),
),
],
),
),
SizedBox(width: 16),
// Pakai Button
Container(
padding: EdgeInsets.symmetric(
horizontal: 24,
vertical: 10,
),
decoration: BoxDecoration(
color: AppColor.primary,
borderRadius: BorderRadius.circular(20),
),
child: Text(
'Pakai',
style: TextStyle(
color: AppColor.white,
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
),
],
),
),
],
),
), ),
), ),
), ),

View File

@ -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''';
}
}

View File

@ -41,5 +41,8 @@ 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),
]; ];
} }

View File

@ -9,7 +9,7 @@
// 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 _i21;
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;
@ -30,7 +30,7 @@ import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart'
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 _i15;
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 _i20;
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;
@ -40,17 +40,19 @@ import 'package:enaklo/presentation/pages/reward/pages/product_redeem/product_re
as _i14; as _i14;
import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i17; import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i17;
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i18; import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i18;
import 'package:flutter/material.dart' as _i21; import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart'
as _i19;
import 'package:flutter/material.dart' as _i22;
/// generated route for /// generated route for
/// [_i1.CreatePasswordPage] /// [_i1.CreatePasswordPage]
class CreatePasswordRoute extends _i20.PageRouteInfo<void> { class CreatePasswordRoute extends _i21.PageRouteInfo<void> {
const CreatePasswordRoute({List<_i20.PageRouteInfo>? children}) const CreatePasswordRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i1.CreatePasswordPage(); return const _i1.CreatePasswordPage();
@ -60,11 +62,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 _i21.PageRouteInfo<DrawDetailRouteArgs> {
DrawDetailRoute({ DrawDetailRoute({
_i21.Key? key, _i22.Key? key,
required _i3.DrawEvent drawEvent, required _i3.DrawEvent drawEvent,
List<_i20.PageRouteInfo>? children, List<_i21.PageRouteInfo>? children,
}) : super( }) : super(
DrawDetailRoute.name, DrawDetailRoute.name,
args: DrawDetailRouteArgs(key: key, drawEvent: drawEvent), args: DrawDetailRouteArgs(key: key, drawEvent: drawEvent),
@ -73,7 +75,7 @@ class DrawDetailRoute extends _i20.PageRouteInfo<DrawDetailRouteArgs> {
static const String name = 'DrawDetailRoute'; static const String name = 'DrawDetailRoute';
static _i20.PageInfo page = _i20.PageInfo( static _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<DrawDetailRouteArgs>(); final args = data.argsAs<DrawDetailRouteArgs>();
@ -85,7 +87,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 _i22.Key? key;
final _i3.DrawEvent drawEvent; final _i3.DrawEvent drawEvent;
@ -97,13 +99,13 @@ class DrawDetailRouteArgs {
/// generated route for /// generated route for
/// [_i3.DrawPage] /// [_i3.DrawPage]
class DrawRoute extends _i20.PageRouteInfo<void> { class DrawRoute extends _i21.PageRouteInfo<void> {
const DrawRoute({List<_i20.PageRouteInfo>? children}) const DrawRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i3.DrawPage(); return const _i3.DrawPage();
@ -113,13 +115,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 _i21.PageRouteInfo<void> {
const HomeRoute({List<_i20.PageRouteInfo>? children}) const HomeRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i4.HomePage(); return const _i4.HomePage();
@ -129,13 +131,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 _i21.PageRouteInfo<void> {
const LoginRoute({List<_i20.PageRouteInfo>? children}) const LoginRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i5.LoginPage(); return const _i5.LoginPage();
@ -145,13 +147,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 _i21.PageRouteInfo<void> {
const MainRoute({List<_i20.PageRouteInfo>? children}) const MainRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i6.MainPage(); return const _i6.MainPage();
@ -161,11 +163,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 _i21.PageRouteInfo<MerchantDetailRouteArgs> {
MerchantDetailRoute({ MerchantDetailRoute({
_i21.Key? key, _i22.Key? key,
required _i8.MerchantModel merchant, required _i8.MerchantModel merchant,
List<_i20.PageRouteInfo>? children, List<_i21.PageRouteInfo>? children,
}) : super( }) : super(
MerchantDetailRoute.name, MerchantDetailRoute.name,
args: MerchantDetailRouteArgs(key: key, merchant: merchant), args: MerchantDetailRouteArgs(key: key, merchant: merchant),
@ -174,7 +176,7 @@ class MerchantDetailRoute extends _i20.PageRouteInfo<MerchantDetailRouteArgs> {
static const String name = 'MerchantDetailRoute'; static const String name = 'MerchantDetailRoute';
static _i20.PageInfo page = _i20.PageInfo( static _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<MerchantDetailRouteArgs>(); final args = data.argsAs<MerchantDetailRouteArgs>();
@ -186,7 +188,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 _i22.Key? key;
final _i8.MerchantModel merchant; final _i8.MerchantModel merchant;
@ -198,13 +200,13 @@ class MerchantDetailRouteArgs {
/// generated route for /// generated route for
/// [_i8.MerchantPage] /// [_i8.MerchantPage]
class MerchantRoute extends _i20.PageRouteInfo<void> { class MerchantRoute extends _i21.PageRouteInfo<void> {
const MerchantRoute({List<_i20.PageRouteInfo>? children}) const MerchantRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i8.MerchantPage(); return const _i8.MerchantPage();
@ -214,13 +216,13 @@ class MerchantRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i9.OnboardingPage] /// [_i9.OnboardingPage]
class OnboardingRoute extends _i20.PageRouteInfo<void> { class OnboardingRoute extends _i21.PageRouteInfo<void> {
const OnboardingRoute({List<_i20.PageRouteInfo>? children}) const OnboardingRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i9.OnboardingPage(); return const _i9.OnboardingPage();
@ -230,13 +232,13 @@ class OnboardingRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i10.OrderPage] /// [_i10.OrderPage]
class OrderRoute extends _i20.PageRouteInfo<void> { class OrderRoute extends _i21.PageRouteInfo<void> {
const OrderRoute({List<_i20.PageRouteInfo>? children}) const OrderRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i10.OrderPage(); return const _i10.OrderPage();
@ -246,13 +248,13 @@ class OrderRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i11.OtpPage] /// [_i11.OtpPage]
class OtpRoute extends _i20.PageRouteInfo<void> { class OtpRoute extends _i21.PageRouteInfo<void> {
const OtpRoute({List<_i20.PageRouteInfo>? children}) const OtpRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i11.OtpPage(); return const _i11.OtpPage();
@ -262,13 +264,13 @@ class OtpRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i12.PasswordPage] /// [_i12.PasswordPage]
class PasswordRoute extends _i20.PageRouteInfo<void> { class PasswordRoute extends _i21.PageRouteInfo<void> {
const PasswordRoute({List<_i20.PageRouteInfo>? children}) const PasswordRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i12.PasswordPage(); return const _i12.PasswordPage();
@ -278,12 +280,12 @@ class PasswordRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i13.PinPage] /// [_i13.PinPage]
class PinRoute extends _i20.PageRouteInfo<PinRouteArgs> { class PinRoute extends _i21.PageRouteInfo<PinRouteArgs> {
PinRoute({ PinRoute({
_i21.Key? key, _i22.Key? key,
bool isCreatePin = true, bool isCreatePin = true,
String? title, String? title,
List<_i20.PageRouteInfo>? children, List<_i21.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,7 +294,7 @@ class PinRoute extends _i20.PageRouteInfo<PinRouteArgs> {
static const String name = 'PinRoute'; static const String name = 'PinRoute';
static _i20.PageInfo page = _i20.PageInfo( static _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<PinRouteArgs>( final args = data.argsAs<PinRouteArgs>(
@ -310,7 +312,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 _i22.Key? key;
final bool isCreatePin; final bool isCreatePin;
@ -324,13 +326,13 @@ class PinRouteArgs {
/// generated route for /// generated route for
/// [_i14.ProductRedeemPage] /// [_i14.ProductRedeemPage]
class ProductRedeemRoute extends _i20.PageRouteInfo<ProductRedeemRouteArgs> { class ProductRedeemRoute extends _i21.PageRouteInfo<ProductRedeemRouteArgs> {
ProductRedeemRoute({ ProductRedeemRoute({
_i21.Key? key, _i22.Key? key,
required _i17.Product product, required _i17.Product product,
required _i17.Merchant merchant, required _i17.Merchant merchant,
required _i17.PointCard pointCard, required _i17.PointCard pointCard,
List<_i20.PageRouteInfo>? children, List<_i21.PageRouteInfo>? children,
}) : super( }) : super(
ProductRedeemRoute.name, ProductRedeemRoute.name,
args: ProductRedeemRouteArgs( args: ProductRedeemRouteArgs(
@ -344,7 +346,7 @@ class ProductRedeemRoute extends _i20.PageRouteInfo<ProductRedeemRouteArgs> {
static const String name = 'ProductRedeemRoute'; static const String name = 'ProductRedeemRoute';
static _i20.PageInfo page = _i20.PageInfo( static _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<ProductRedeemRouteArgs>(); final args = data.argsAs<ProductRedeemRouteArgs>();
@ -366,7 +368,7 @@ class ProductRedeemRouteArgs {
required this.pointCard, required this.pointCard,
}); });
final _i21.Key? key; final _i22.Key? key;
final _i17.Product product; final _i17.Product product;
@ -382,13 +384,13 @@ class ProductRedeemRouteArgs {
/// generated route for /// generated route for
/// [_i15.ProfilePage] /// [_i15.ProfilePage]
class ProfileRoute extends _i20.PageRouteInfo<void> { class ProfileRoute extends _i21.PageRouteInfo<void> {
const ProfileRoute({List<_i20.PageRouteInfo>? children}) const ProfileRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i15.ProfilePage(); return const _i15.ProfilePage();
@ -398,13 +400,13 @@ class ProfileRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i16.RegisterPage] /// [_i16.RegisterPage]
class RegisterRoute extends _i20.PageRouteInfo<void> { class RegisterRoute extends _i21.PageRouteInfo<void> {
const RegisterRoute({List<_i20.PageRouteInfo>? children}) const RegisterRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i16.RegisterPage(); return const _i16.RegisterPage();
@ -414,13 +416,13 @@ class RegisterRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i17.RewardPage] /// [_i17.RewardPage]
class RewardRoute extends _i20.PageRouteInfo<void> { class RewardRoute extends _i21.PageRouteInfo<void> {
const RewardRoute({List<_i20.PageRouteInfo>? children}) const RewardRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i17.RewardPage(); return const _i17.RewardPage();
@ -430,13 +432,13 @@ class RewardRoute extends _i20.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i18.SplashPage] /// [_i18.SplashPage]
class SplashRoute extends _i20.PageRouteInfo<void> { class SplashRoute extends _i21.PageRouteInfo<void> {
const SplashRoute({List<_i20.PageRouteInfo>? children}) const SplashRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i18.SplashPage(); return const _i18.SplashPage();
@ -445,17 +447,33 @@ class SplashRoute extends _i20.PageRouteInfo<void> {
} }
/// generated route for /// generated route for
/// [_i19.VoucherPage] /// [_i19.VoucherDetailPage]
class VoucherRoute extends _i20.PageRouteInfo<void> { class VoucherDetailRoute extends _i21.PageRouteInfo<void> {
const VoucherRoute({List<_i20.PageRouteInfo>? children}) const VoucherDetailRoute({List<_i21.PageRouteInfo>? children})
: super(VoucherDetailRoute.name, initialChildren: children);
static const String name = 'VoucherDetailRoute';
static _i21.PageInfo page = _i21.PageInfo(
name,
builder: (data) {
return const _i19.VoucherDetailPage();
},
);
}
/// generated route for
/// [_i20.VoucherPage]
class VoucherRoute extends _i21.PageRouteInfo<void> {
const VoucherRoute({List<_i21.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 _i21.PageInfo page = _i21.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i19.VoucherPage(); return const _i20.VoucherPage();
}, },
); );
} }