feat: reward page

This commit is contained in:
efrilm 2025-08-29 20:34:26 +07:00
parent 00c9d8435a
commit c790d00341
5 changed files with 594 additions and 91 deletions

View File

@ -74,5 +74,10 @@ class ThemeApp {
backgroundColor: AppColor.white, backgroundColor: AppColor.white,
elevation: 4, elevation: 4,
), ),
tabBarTheme: TabBarThemeData(
indicatorColor: AppColor.primary,
labelColor: AppColor.primary,
unselectedLabelColor: AppColor.textSecondary,
),
); );
} }

View File

@ -17,7 +17,7 @@ class HomeFeatureSection extends StatelessWidget {
icon: Icons.card_giftcard, icon: Icons.card_giftcard,
title: 'Reward', title: 'Reward',
iconColor: const Color(0xFF1976D2), iconColor: const Color(0xFF1976D2),
onTap: () {}, onTap: () => context.router.push(RewardRoute()),
), ),
HomeFeatureCard( HomeFeatureCard(
icon: Icons.casino, icon: Icons.casino,

View File

@ -0,0 +1,478 @@
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import '../../../common/theme/theme.dart';
// Models
class Reward {
final String id;
final String name;
final String image;
final int pointsUsed;
final String description;
final DateTime redeemedAt;
final RewardStatus status;
final String? couponCode;
final String? validUntil;
final String? termsAndConditions;
final String categoryName;
final String categoryIcon;
Reward({
required this.id,
required this.name,
required this.image,
required this.pointsUsed,
required this.description,
required this.redeemedAt,
required this.status,
required this.categoryName,
required this.categoryIcon,
this.couponCode,
this.validUntil,
this.termsAndConditions,
});
String get statusText {
switch (status) {
case RewardStatus.active:
return "Aktif";
case RewardStatus.used:
return "Sudah Digunakan";
case RewardStatus.expired:
return "Kadaluarsa";
}
}
Color get statusColor {
switch (status) {
case RewardStatus.active:
return AppColor.success;
case RewardStatus.used:
return AppColor.textSecondary;
case RewardStatus.expired:
return AppColor.error;
}
}
}
enum RewardStatus { active, used, expired }
@RoutePage()
class RewardPage extends StatefulWidget {
const RewardPage({super.key});
@override
State<RewardPage> createState() => _RewardPageState();
}
class _RewardPageState extends State<RewardPage>
with SingleTickerProviderStateMixin {
late TabController _tabController;
// Sample reward data
final List<Reward> rewards = [
Reward(
id: "r1",
name: "Es Teh Manis",
image: "🧊",
pointsUsed: 1500,
description: "Teh manis dingin segar",
redeemedAt: DateTime.now().subtract(Duration(hours: 2)),
status: RewardStatus.active,
categoryName: "Minuman",
categoryIcon: "🥤",
couponCode: "ETM123456",
validUntil: "31 Des 2025",
termsAndConditions:
"Berlaku untuk dine-in dan take away. Tidak dapat digabung dengan promo lain.",
),
Reward(
id: "r2",
name: "Diskon 50%",
image: "🏷️",
pointsUsed: 5000,
description: "Potongan harga 50% untuk semua menu",
redeemedAt: DateTime.now().subtract(Duration(days: 1)),
status: RewardStatus.used,
categoryName: "Voucher",
categoryIcon: "🎟️",
couponCode: "DISC50789",
validUntil: "15 Des 2025",
termsAndConditions:
"Berlaku untuk pembelian minimum Rp 50.000. Tidak berlaku untuk menu promo.",
),
Reward(
id: "r3",
name: "Nasi Gudeg",
image: "🍛",
pointsUsed: 4000,
description: "Gudeg Jogja autentik",
redeemedAt: DateTime.now().subtract(Duration(days: 3)),
status: RewardStatus.active,
categoryName: "Makanan",
categoryIcon: "🍽️",
couponCode: "GUDEG456",
validUntil: "25 Des 2025",
termsAndConditions:
"Berlaku untuk 1 porsi. Dapat dimakan di tempat atau dibawa pulang.",
),
Reward(
id: "r4",
name: "Gratis Ongkir",
image: "🚚",
pointsUsed: 2000,
description: "Bebas ongkos kirim untuk pesanan apapun",
redeemedAt: DateTime.now().subtract(Duration(days: 15)),
status: RewardStatus.expired,
categoryName: "Voucher",
categoryIcon: "🎟️",
validUntil: "20 Agu 2025",
termsAndConditions:
"Berlaku untuk area Jabodetabek. Minimum pembelian Rp 25.000.",
),
Reward(
id: "r5",
name: "Kopi Susu",
image: "",
pointsUsed: 2000,
description: "Kopi dengan susu creamy",
redeemedAt: DateTime.now().subtract(Duration(days: 7)),
status: RewardStatus.used,
categoryName: "Minuman",
categoryIcon: "🥤",
couponCode: "KOPI987654",
validUntil: "30 Nov 2025",
termsAndConditions:
"Berlaku untuk size regular. Dapat request level manis.",
),
];
@override
void initState() {
super.initState();
_tabController = TabController(length: 4, vsync: this);
}
List<Reward> get filteredRewards {
switch (_tabController.index) {
case 0:
return rewards; // Semua
case 1:
return rewards.where((r) => r.status == RewardStatus.active).toList();
case 2:
return rewards.where((r) => r.status == RewardStatus.used).toList();
case 3:
return rewards.where((r) => r.status == RewardStatus.expired).toList();
default:
return rewards;
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.backgroundLight,
appBar: AppBar(title: Text("Reward Saya"), centerTitle: true),
body: Column(
children: [
_buildCleanTabBar(),
Expanded(
child: TabBarView(
controller: _tabController,
children: [
_buildRewardList(), // Semua
_buildRewardList(), // Aktif
_buildRewardList(), // Digunakan
_buildRewardList(), // Kadaluarsa
],
),
),
],
),
);
}
Widget _buildCleanTabBar() {
final activeCount = rewards
.where((r) => r.status == RewardStatus.active)
.length;
final usedCount = rewards
.where((r) => r.status == RewardStatus.used)
.length;
final expiredCount = rewards
.where((r) => r.status == RewardStatus.expired)
.length;
return Container(
margin: EdgeInsets.symmetric(horizontal: 20, vertical: 12),
decoration: BoxDecoration(
color: AppColor.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.04),
blurRadius: 20,
offset: Offset(0, 4),
),
],
),
child: TabBar(
controller: _tabController,
indicatorSize: TabBarIndicatorSize.tab,
isScrollable: true,
tabAlignment: TabAlignment.start,
dividerColor: Colors.transparent,
onTap: (index) => setState(() {}),
tabs: [
_buildCleanTab("Semua", rewards.length),
_buildCleanTab("Aktif", activeCount),
_buildCleanTab("Terpakai", usedCount),
_buildCleanTab("Expired", expiredCount),
],
),
);
}
Widget _buildCleanTab(String label, int count) {
return Container(height: 44, child: Center(child: Text("$label ($count)")));
}
Widget _buildRewardList() {
final filteredData = filteredRewards;
if (filteredData.isEmpty) {
return _buildEmptyState();
}
return ListView.builder(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 8),
itemCount: filteredData.length,
itemBuilder: (context, index) {
final reward = filteredData[index];
return _buildCleanRewardCard(reward);
},
);
}
Widget _buildEmptyState() {
String message;
String icon;
switch (_tabController.index) {
case 1:
message = "Belum ada reward aktif";
icon = "🎯";
break;
case 2:
message = "Belum ada reward yang digunakan";
icon = "";
break;
case 3:
message = "Tidak ada reward yang kadaluarsa";
icon = "";
break;
default:
message = "Belum ada reward";
icon = "🎁";
}
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(icon, style: TextStyle(fontSize: 64)),
SizedBox(height: 16),
Text(
message,
style: AppStyle.lg.copyWith(
color: AppColor.textSecondary,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 8),
Text(
"Tukar poin Anda untuk mendapatkan reward menarik",
style: AppStyle.sm.copyWith(color: AppColor.textLight),
textAlign: TextAlign.center,
),
SizedBox(height: 24),
ElevatedButton(
onPressed: () => context.router.back(),
style: ElevatedButton.styleFrom(
backgroundColor: AppColor.primary,
foregroundColor: AppColor.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 12),
elevation: 0,
),
child: Text(
"Tukar Poin Sekarang",
style: AppStyle.sm.copyWith(
fontWeight: FontWeight.w600,
color: AppColor.white,
),
),
),
],
),
);
}
Widget _buildCleanRewardCard(Reward reward) {
return Container(
margin: EdgeInsets.only(bottom: 12),
decoration: BoxDecoration(
color: AppColor.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.04),
blurRadius: 20,
offset: Offset(0, 4),
),
],
),
child: InkWell(
onTap: () {},
borderRadius: BorderRadius.circular(16),
child: Padding(
padding: EdgeInsets.all(20),
child: Row(
children: [
// Product Image - Simplified
Container(
width: 56,
height: 56,
decoration: BoxDecoration(
color: AppColor.backgroundLight,
borderRadius: BorderRadius.circular(14),
),
child: Center(
child: Text(reward.image, style: TextStyle(fontSize: 24)),
),
),
SizedBox(width: 16),
// Reward Info - Cleaner layout
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(
child: Text(
reward.name,
style: AppStyle.md.copyWith(
fontWeight: FontWeight.w600,
color: AppColor.textPrimary,
),
),
),
_buildStatusBadge(reward),
],
),
SizedBox(height: 4),
Text(
reward.description,
style: AppStyle.sm.copyWith(
color: AppColor.textSecondary,
),
),
SizedBox(height: 8),
Row(
children: [
Icon(
Icons.access_time,
size: 12,
color: AppColor.textLight,
),
SizedBox(width: 4),
Text(
_formatDate(reward.redeemedAt),
style: AppStyle.xs.copyWith(
color: AppColor.textLight,
),
),
Spacer(),
Icon(Icons.stars, size: 14, color: AppColor.warning),
SizedBox(width: 4),
Text(
"${reward.pointsUsed}",
style: AppStyle.xs.copyWith(
color: AppColor.textSecondary,
fontWeight: FontWeight.w600,
),
),
],
),
],
),
),
],
),
),
),
);
}
Widget _buildStatusBadge(Reward reward) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: reward.statusColor.withOpacity(0.1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
reward.statusText,
style: AppStyle.xs.copyWith(
color: reward.statusColor,
fontWeight: FontWeight.w600,
),
),
);
}
String _formatDate(DateTime date) {
final months = [
'',
'Jan',
'Feb',
'Mar',
'Apr',
'Mei',
'Jun',
'Jul',
'Agu',
'Sep',
'Okt',
'Nov',
'Des',
];
final now = DateTime.now();
final difference = now.difference(date);
if (difference.inDays == 0) {
if (difference.inHours == 0) {
return "${difference.inMinutes} menit lalu";
}
return "${difference.inHours} jam lalu";
} else if (difference.inDays == 1) {
return "Kemarin";
} else if (difference.inDays < 7) {
return "${difference.inDays} hari lalu";
} else {
return "${date.day} ${months[date.month]} ${date.year}";
}
}
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
}

View File

@ -51,5 +51,8 @@ class AppRouter extends RootStackRouter {
// Order // Order
AutoRoute(page: OrderDetailRoute.page), AutoRoute(page: OrderDetailRoute.page),
// Reward
AutoRoute(page: RewardRoute.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 _i24; import 'package:auto_route/auto_route.dart' as _i25;
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 _i19; as _i19;
import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart' import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart'
as _i23; as _i24;
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;
@ -45,20 +45,21 @@ import 'package:enaklo/presentation/pages/poin/pages/poin_history_page.dart'
import 'package:enaklo/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart' import 'package:enaklo/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart'
as _i18; as _i18;
import 'package:enaklo/presentation/pages/poin/poin_page.dart' as _i17; import 'package:enaklo/presentation/pages/poin/poin_page.dart' as _i17;
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i21; import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i21;
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i22;
import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart' import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart'
as _i22; as _i23;
import 'package:flutter/material.dart' as _i25; import 'package:flutter/material.dart' as _i26;
/// generated route for /// generated route for
/// [_i1.CreatePasswordPage] /// [_i1.CreatePasswordPage]
class CreatePasswordRoute extends _i24.PageRouteInfo<void> { class CreatePasswordRoute extends _i25.PageRouteInfo<void> {
const CreatePasswordRoute({List<_i24.PageRouteInfo>? children}) const CreatePasswordRoute({List<_i25.PageRouteInfo>? children})
: super(CreatePasswordRoute.name, initialChildren: children); : super(CreatePasswordRoute.name, initialChildren: children);
static const String name = 'CreatePasswordRoute'; static const String name = 'CreatePasswordRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i1.CreatePasswordPage(); return const _i1.CreatePasswordPage();
@ -68,11 +69,11 @@ class CreatePasswordRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i2.DrawDetailPage] /// [_i2.DrawDetailPage]
class DrawDetailRoute extends _i24.PageRouteInfo<DrawDetailRouteArgs> { class DrawDetailRoute extends _i25.PageRouteInfo<DrawDetailRouteArgs> {
DrawDetailRoute({ DrawDetailRoute({
_i25.Key? key, _i26.Key? key,
required _i3.DrawEvent drawEvent, required _i3.DrawEvent drawEvent,
List<_i24.PageRouteInfo>? children, List<_i25.PageRouteInfo>? children,
}) : super( }) : super(
DrawDetailRoute.name, DrawDetailRoute.name,
args: DrawDetailRouteArgs(key: key, drawEvent: drawEvent), args: DrawDetailRouteArgs(key: key, drawEvent: drawEvent),
@ -81,7 +82,7 @@ class DrawDetailRoute extends _i24.PageRouteInfo<DrawDetailRouteArgs> {
static const String name = 'DrawDetailRoute'; static const String name = 'DrawDetailRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<DrawDetailRouteArgs>(); final args = data.argsAs<DrawDetailRouteArgs>();
@ -93,7 +94,7 @@ class DrawDetailRoute extends _i24.PageRouteInfo<DrawDetailRouteArgs> {
class DrawDetailRouteArgs { class DrawDetailRouteArgs {
const DrawDetailRouteArgs({this.key, required this.drawEvent}); const DrawDetailRouteArgs({this.key, required this.drawEvent});
final _i25.Key? key; final _i26.Key? key;
final _i3.DrawEvent drawEvent; final _i3.DrawEvent drawEvent;
@ -105,13 +106,13 @@ class DrawDetailRouteArgs {
/// generated route for /// generated route for
/// [_i3.DrawPage] /// [_i3.DrawPage]
class DrawRoute extends _i24.PageRouteInfo<void> { class DrawRoute extends _i25.PageRouteInfo<void> {
const DrawRoute({List<_i24.PageRouteInfo>? children}) const DrawRoute({List<_i25.PageRouteInfo>? children})
: super(DrawRoute.name, initialChildren: children); : super(DrawRoute.name, initialChildren: children);
static const String name = 'DrawRoute'; static const String name = 'DrawRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i3.DrawPage(); return const _i3.DrawPage();
@ -121,13 +122,13 @@ class DrawRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i4.HomePage] /// [_i4.HomePage]
class HomeRoute extends _i24.PageRouteInfo<void> { class HomeRoute extends _i25.PageRouteInfo<void> {
const HomeRoute({List<_i24.PageRouteInfo>? children}) const HomeRoute({List<_i25.PageRouteInfo>? children})
: super(HomeRoute.name, initialChildren: children); : super(HomeRoute.name, initialChildren: children);
static const String name = 'HomeRoute'; static const String name = 'HomeRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i4.HomePage(); return const _i4.HomePage();
@ -137,13 +138,13 @@ class HomeRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i5.LoginPage] /// [_i5.LoginPage]
class LoginRoute extends _i24.PageRouteInfo<void> { class LoginRoute extends _i25.PageRouteInfo<void> {
const LoginRoute({List<_i24.PageRouteInfo>? children}) const LoginRoute({List<_i25.PageRouteInfo>? children})
: super(LoginRoute.name, initialChildren: children); : super(LoginRoute.name, initialChildren: children);
static const String name = 'LoginRoute'; static const String name = 'LoginRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i5.LoginPage(); return const _i5.LoginPage();
@ -153,13 +154,13 @@ class LoginRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i6.MainPage] /// [_i6.MainPage]
class MainRoute extends _i24.PageRouteInfo<void> { class MainRoute extends _i25.PageRouteInfo<void> {
const MainRoute({List<_i24.PageRouteInfo>? children}) const MainRoute({List<_i25.PageRouteInfo>? children})
: super(MainRoute.name, initialChildren: children); : super(MainRoute.name, initialChildren: children);
static const String name = 'MainRoute'; static const String name = 'MainRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i6.MainPage(); return const _i6.MainPage();
@ -169,11 +170,11 @@ class MainRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i7.MerchantDetailPage] /// [_i7.MerchantDetailPage]
class MerchantDetailRoute extends _i24.PageRouteInfo<MerchantDetailRouteArgs> { class MerchantDetailRoute extends _i25.PageRouteInfo<MerchantDetailRouteArgs> {
MerchantDetailRoute({ MerchantDetailRoute({
_i25.Key? key, _i26.Key? key,
required _i8.MerchantModel merchant, required _i8.MerchantModel merchant,
List<_i24.PageRouteInfo>? children, List<_i25.PageRouteInfo>? children,
}) : super( }) : super(
MerchantDetailRoute.name, MerchantDetailRoute.name,
args: MerchantDetailRouteArgs(key: key, merchant: merchant), args: MerchantDetailRouteArgs(key: key, merchant: merchant),
@ -182,7 +183,7 @@ class MerchantDetailRoute extends _i24.PageRouteInfo<MerchantDetailRouteArgs> {
static const String name = 'MerchantDetailRoute'; static const String name = 'MerchantDetailRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<MerchantDetailRouteArgs>(); final args = data.argsAs<MerchantDetailRouteArgs>();
@ -194,7 +195,7 @@ class MerchantDetailRoute extends _i24.PageRouteInfo<MerchantDetailRouteArgs> {
class MerchantDetailRouteArgs { class MerchantDetailRouteArgs {
const MerchantDetailRouteArgs({this.key, required this.merchant}); const MerchantDetailRouteArgs({this.key, required this.merchant});
final _i25.Key? key; final _i26.Key? key;
final _i8.MerchantModel merchant; final _i8.MerchantModel merchant;
@ -206,13 +207,13 @@ class MerchantDetailRouteArgs {
/// generated route for /// generated route for
/// [_i8.MerchantPage] /// [_i8.MerchantPage]
class MerchantRoute extends _i24.PageRouteInfo<void> { class MerchantRoute extends _i25.PageRouteInfo<void> {
const MerchantRoute({List<_i24.PageRouteInfo>? children}) const MerchantRoute({List<_i25.PageRouteInfo>? children})
: super(MerchantRoute.name, initialChildren: children); : super(MerchantRoute.name, initialChildren: children);
static const String name = 'MerchantRoute'; static const String name = 'MerchantRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i8.MerchantPage(); return const _i8.MerchantPage();
@ -222,13 +223,13 @@ class MerchantRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i9.NotificationPage] /// [_i9.NotificationPage]
class NotificationRoute extends _i24.PageRouteInfo<void> { class NotificationRoute extends _i25.PageRouteInfo<void> {
const NotificationRoute({List<_i24.PageRouteInfo>? children}) const NotificationRoute({List<_i25.PageRouteInfo>? children})
: super(NotificationRoute.name, initialChildren: children); : super(NotificationRoute.name, initialChildren: children);
static const String name = 'NotificationRoute'; static const String name = 'NotificationRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i9.NotificationPage(); return const _i9.NotificationPage();
@ -238,13 +239,13 @@ class NotificationRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i10.OnboardingPage] /// [_i10.OnboardingPage]
class OnboardingRoute extends _i24.PageRouteInfo<void> { class OnboardingRoute extends _i25.PageRouteInfo<void> {
const OnboardingRoute({List<_i24.PageRouteInfo>? children}) const OnboardingRoute({List<_i25.PageRouteInfo>? children})
: super(OnboardingRoute.name, initialChildren: children); : super(OnboardingRoute.name, initialChildren: children);
static const String name = 'OnboardingRoute'; static const String name = 'OnboardingRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i10.OnboardingPage(); return const _i10.OnboardingPage();
@ -254,11 +255,11 @@ class OnboardingRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i11.OrderDetailPage] /// [_i11.OrderDetailPage]
class OrderDetailRoute extends _i24.PageRouteInfo<OrderDetailRouteArgs> { class OrderDetailRoute extends _i25.PageRouteInfo<OrderDetailRouteArgs> {
OrderDetailRoute({ OrderDetailRoute({
_i25.Key? key, _i26.Key? key,
required _i12.Order order, required _i12.Order order,
List<_i24.PageRouteInfo>? children, List<_i25.PageRouteInfo>? children,
}) : super( }) : super(
OrderDetailRoute.name, OrderDetailRoute.name,
args: OrderDetailRouteArgs(key: key, order: order), args: OrderDetailRouteArgs(key: key, order: order),
@ -267,7 +268,7 @@ class OrderDetailRoute extends _i24.PageRouteInfo<OrderDetailRouteArgs> {
static const String name = 'OrderDetailRoute'; static const String name = 'OrderDetailRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<OrderDetailRouteArgs>(); final args = data.argsAs<OrderDetailRouteArgs>();
@ -279,7 +280,7 @@ class OrderDetailRoute extends _i24.PageRouteInfo<OrderDetailRouteArgs> {
class OrderDetailRouteArgs { class OrderDetailRouteArgs {
const OrderDetailRouteArgs({this.key, required this.order}); const OrderDetailRouteArgs({this.key, required this.order});
final _i25.Key? key; final _i26.Key? key;
final _i12.Order order; final _i12.Order order;
@ -291,13 +292,13 @@ class OrderDetailRouteArgs {
/// generated route for /// generated route for
/// [_i12.OrderPage] /// [_i12.OrderPage]
class OrderRoute extends _i24.PageRouteInfo<void> { class OrderRoute extends _i25.PageRouteInfo<void> {
const OrderRoute({List<_i24.PageRouteInfo>? children}) const OrderRoute({List<_i25.PageRouteInfo>? children})
: super(OrderRoute.name, initialChildren: children); : super(OrderRoute.name, initialChildren: children);
static const String name = 'OrderRoute'; static const String name = 'OrderRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i12.OrderPage(); return const _i12.OrderPage();
@ -307,13 +308,13 @@ class OrderRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i13.OtpPage] /// [_i13.OtpPage]
class OtpRoute extends _i24.PageRouteInfo<void> { class OtpRoute extends _i25.PageRouteInfo<void> {
const OtpRoute({List<_i24.PageRouteInfo>? children}) const OtpRoute({List<_i25.PageRouteInfo>? children})
: super(OtpRoute.name, initialChildren: children); : super(OtpRoute.name, initialChildren: children);
static const String name = 'OtpRoute'; static const String name = 'OtpRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i13.OtpPage(); return const _i13.OtpPage();
@ -323,13 +324,13 @@ class OtpRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i14.PasswordPage] /// [_i14.PasswordPage]
class PasswordRoute extends _i24.PageRouteInfo<void> { class PasswordRoute extends _i25.PageRouteInfo<void> {
const PasswordRoute({List<_i24.PageRouteInfo>? children}) const PasswordRoute({List<_i25.PageRouteInfo>? children})
: super(PasswordRoute.name, initialChildren: children); : super(PasswordRoute.name, initialChildren: children);
static const String name = 'PasswordRoute'; static const String name = 'PasswordRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i14.PasswordPage(); return const _i14.PasswordPage();
@ -339,12 +340,12 @@ class PasswordRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i15.PinPage] /// [_i15.PinPage]
class PinRoute extends _i24.PageRouteInfo<PinRouteArgs> { class PinRoute extends _i25.PageRouteInfo<PinRouteArgs> {
PinRoute({ PinRoute({
_i25.Key? key, _i26.Key? key,
bool isCreatePin = true, bool isCreatePin = true,
String? title, String? title,
List<_i24.PageRouteInfo>? children, List<_i25.PageRouteInfo>? children,
}) : super( }) : super(
PinRoute.name, PinRoute.name,
args: PinRouteArgs(key: key, isCreatePin: isCreatePin, title: title), args: PinRouteArgs(key: key, isCreatePin: isCreatePin, title: title),
@ -353,7 +354,7 @@ class PinRoute extends _i24.PageRouteInfo<PinRouteArgs> {
static const String name = 'PinRoute'; static const String name = 'PinRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<PinRouteArgs>( final args = data.argsAs<PinRouteArgs>(
@ -371,7 +372,7 @@ class PinRoute extends _i24.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 _i25.Key? key; final _i26.Key? key;
final bool isCreatePin; final bool isCreatePin;
@ -385,13 +386,13 @@ class PinRouteArgs {
/// generated route for /// generated route for
/// [_i16.PoinHistoryPage] /// [_i16.PoinHistoryPage]
class PoinHistoryRoute extends _i24.PageRouteInfo<void> { class PoinHistoryRoute extends _i25.PageRouteInfo<void> {
const PoinHistoryRoute({List<_i24.PageRouteInfo>? children}) const PoinHistoryRoute({List<_i25.PageRouteInfo>? children})
: super(PoinHistoryRoute.name, initialChildren: children); : super(PoinHistoryRoute.name, initialChildren: children);
static const String name = 'PoinHistoryRoute'; static const String name = 'PoinHistoryRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i16.PoinHistoryPage(); return const _i16.PoinHistoryPage();
@ -401,13 +402,13 @@ class PoinHistoryRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i17.PoinPage] /// [_i17.PoinPage]
class PoinRoute extends _i24.PageRouteInfo<void> { class PoinRoute extends _i25.PageRouteInfo<void> {
const PoinRoute({List<_i24.PageRouteInfo>? children}) const PoinRoute({List<_i25.PageRouteInfo>? children})
: super(PoinRoute.name, initialChildren: children); : super(PoinRoute.name, initialChildren: children);
static const String name = 'PoinRoute'; static const String name = 'PoinRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i17.PoinPage(); return const _i17.PoinPage();
@ -417,12 +418,12 @@ class PoinRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i18.ProductRedeemPage] /// [_i18.ProductRedeemPage]
class ProductRedeemRoute extends _i24.PageRouteInfo<ProductRedeemRouteArgs> { class ProductRedeemRoute extends _i25.PageRouteInfo<ProductRedeemRouteArgs> {
ProductRedeemRoute({ ProductRedeemRoute({
_i25.Key? key, _i26.Key? key,
required _i17.Product product, required _i17.Product product,
required _i17.PointCard pointCard, required _i17.PointCard pointCard,
List<_i24.PageRouteInfo>? children, List<_i25.PageRouteInfo>? children,
}) : super( }) : super(
ProductRedeemRoute.name, ProductRedeemRoute.name,
args: ProductRedeemRouteArgs( args: ProductRedeemRouteArgs(
@ -435,7 +436,7 @@ class ProductRedeemRoute extends _i24.PageRouteInfo<ProductRedeemRouteArgs> {
static const String name = 'ProductRedeemRoute'; static const String name = 'ProductRedeemRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = data.argsAs<ProductRedeemRouteArgs>(); final args = data.argsAs<ProductRedeemRouteArgs>();
@ -455,7 +456,7 @@ class ProductRedeemRouteArgs {
required this.pointCard, required this.pointCard,
}); });
final _i25.Key? key; final _i26.Key? key;
final _i17.Product product; final _i17.Product product;
@ -469,13 +470,13 @@ class ProductRedeemRouteArgs {
/// generated route for /// generated route for
/// [_i19.ProfilePage] /// [_i19.ProfilePage]
class ProfileRoute extends _i24.PageRouteInfo<void> { class ProfileRoute extends _i25.PageRouteInfo<void> {
const ProfileRoute({List<_i24.PageRouteInfo>? children}) const ProfileRoute({List<_i25.PageRouteInfo>? children})
: super(ProfileRoute.name, initialChildren: children); : super(ProfileRoute.name, initialChildren: children);
static const String name = 'ProfileRoute'; static const String name = 'ProfileRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i19.ProfilePage(); return const _i19.ProfilePage();
@ -485,13 +486,13 @@ class ProfileRoute extends _i24.PageRouteInfo<void> {
/// generated route for /// generated route for
/// [_i20.RegisterPage] /// [_i20.RegisterPage]
class RegisterRoute extends _i24.PageRouteInfo<void> { class RegisterRoute extends _i25.PageRouteInfo<void> {
const RegisterRoute({List<_i24.PageRouteInfo>? children}) const RegisterRoute({List<_i25.PageRouteInfo>? children})
: super(RegisterRoute.name, initialChildren: children); : super(RegisterRoute.name, initialChildren: children);
static const String name = 'RegisterRoute'; static const String name = 'RegisterRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i20.RegisterPage(); return const _i20.RegisterPage();
@ -500,49 +501,65 @@ class RegisterRoute extends _i24.PageRouteInfo<void> {
} }
/// generated route for /// generated route for
/// [_i21.SplashPage] /// [_i21.RewardPage]
class SplashRoute extends _i24.PageRouteInfo<void> { class RewardRoute extends _i25.PageRouteInfo<void> {
const SplashRoute({List<_i24.PageRouteInfo>? children}) const RewardRoute({List<_i25.PageRouteInfo>? children})
: super(RewardRoute.name, initialChildren: children);
static const String name = 'RewardRoute';
static _i25.PageInfo page = _i25.PageInfo(
name,
builder: (data) {
return const _i21.RewardPage();
},
);
}
/// generated route for
/// [_i22.SplashPage]
class SplashRoute extends _i25.PageRouteInfo<void> {
const SplashRoute({List<_i25.PageRouteInfo>? children})
: super(SplashRoute.name, initialChildren: children); : super(SplashRoute.name, initialChildren: children);
static const String name = 'SplashRoute'; static const String name = 'SplashRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i21.SplashPage(); return const _i22.SplashPage();
}, },
); );
} }
/// generated route for /// generated route for
/// [_i22.VoucherDetailPage] /// [_i23.VoucherDetailPage]
class VoucherDetailRoute extends _i24.PageRouteInfo<void> { class VoucherDetailRoute extends _i25.PageRouteInfo<void> {
const VoucherDetailRoute({List<_i24.PageRouteInfo>? children}) const VoucherDetailRoute({List<_i25.PageRouteInfo>? children})
: super(VoucherDetailRoute.name, initialChildren: children); : super(VoucherDetailRoute.name, initialChildren: children);
static const String name = 'VoucherDetailRoute'; static const String name = 'VoucherDetailRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i22.VoucherDetailPage(); return const _i23.VoucherDetailPage();
}, },
); );
} }
/// generated route for /// generated route for
/// [_i23.VoucherPage] /// [_i24.VoucherPage]
class VoucherRoute extends _i24.PageRouteInfo<void> { class VoucherRoute extends _i25.PageRouteInfo<void> {
const VoucherRoute({List<_i24.PageRouteInfo>? children}) const VoucherRoute({List<_i25.PageRouteInfo>? children})
: super(VoucherRoute.name, initialChildren: children); : super(VoucherRoute.name, initialChildren: children);
static const String name = 'VoucherRoute'; static const String name = 'VoucherRoute';
static _i24.PageInfo page = _i24.PageInfo( static _i25.PageInfo page = _i25.PageInfo(
name, name,
builder: (data) { builder: (data) {
return const _i23.VoucherPage(); return const _i24.VoucherPage();
}, },
); );
} }