Compare commits
No commits in common. "c790d00341297f47d2fddd7f42e1069492356a04" and "079813e95b6d6d4a716ad87ff54aec4e48b588d9" have entirely different histories.
c790d00341
...
079813e95b
@ -74,10 +74,5 @@ class ThemeApp {
|
||||
backgroundColor: AppColor.white,
|
||||
elevation: 4,
|
||||
),
|
||||
tabBarTheme: TabBarThemeData(
|
||||
indicatorColor: AppColor.primary,
|
||||
labelColor: AppColor.primary,
|
||||
unselectedLabelColor: AppColor.textSecondary,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ class HomeFeatureSection extends StatelessWidget {
|
||||
icon: Icons.card_giftcard,
|
||||
title: 'Reward',
|
||||
iconColor: const Color(0xFF1976D2),
|
||||
onTap: () => context.router.push(RewardRoute()),
|
||||
onTap: () {},
|
||||
),
|
||||
HomeFeatureCard(
|
||||
icon: Icons.casino,
|
||||
|
||||
@ -1,388 +0,0 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../common/theme/theme.dart';
|
||||
|
||||
// Models
|
||||
enum TransactionType {
|
||||
all('Semua'),
|
||||
redeemed('Poin Ditukar'),
|
||||
earned('Poin Didapat'),
|
||||
refunded('Poin Dikembalikan'),
|
||||
bonus('Bonus Poin');
|
||||
|
||||
const TransactionType(this.label);
|
||||
final String label;
|
||||
}
|
||||
|
||||
class PointTransaction {
|
||||
final String id;
|
||||
final String title;
|
||||
final String category;
|
||||
final String source;
|
||||
final int points;
|
||||
final TransactionType type;
|
||||
final DateTime date;
|
||||
final String? productImage;
|
||||
|
||||
PointTransaction({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.category,
|
||||
required this.source,
|
||||
required this.points,
|
||||
required this.type,
|
||||
required this.date,
|
||||
this.productImage,
|
||||
});
|
||||
|
||||
bool get isPositive =>
|
||||
type == TransactionType.earned ||
|
||||
type == TransactionType.refunded ||
|
||||
type == TransactionType.bonus;
|
||||
}
|
||||
|
||||
@RoutePage()
|
||||
class PoinHistoryPage extends StatefulWidget {
|
||||
const PoinHistoryPage({super.key});
|
||||
|
||||
@override
|
||||
State<PoinHistoryPage> createState() => _PoinHistoryPageState();
|
||||
}
|
||||
|
||||
class _PoinHistoryPageState extends State<PoinHistoryPage> {
|
||||
TransactionType selectedFilter = TransactionType.all;
|
||||
|
||||
// Sample transaction data
|
||||
final List<PointTransaction> allTransactions = [
|
||||
PointTransaction(
|
||||
id: "t1",
|
||||
title: "Es Teh Manis",
|
||||
category: "Minuman",
|
||||
source: "Penukaran Voucher",
|
||||
points: -1500,
|
||||
type: TransactionType.redeemed,
|
||||
date: DateTime.now().subtract(Duration(hours: 2)),
|
||||
productImage: "🧊",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t2",
|
||||
title: "Nasi Gudeg",
|
||||
category: "Makanan",
|
||||
source: "Transaksi Pembelian",
|
||||
points: 400,
|
||||
type: TransactionType.earned,
|
||||
date: DateTime.now().subtract(Duration(days: 1)),
|
||||
productImage: "🍛",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t3",
|
||||
title: "Member Emas",
|
||||
category: "Membership",
|
||||
source: "Bonus Bulanan",
|
||||
points: 2000,
|
||||
type: TransactionType.bonus,
|
||||
date: DateTime.now().subtract(Duration(days: 2)),
|
||||
productImage: "🎁",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t4",
|
||||
title: "Kopi Susu",
|
||||
category: "Minuman",
|
||||
source: "Pembatalan Pesanan",
|
||||
points: 2000,
|
||||
type: TransactionType.refunded,
|
||||
date: DateTime.now().subtract(Duration(days: 3)),
|
||||
productImage: "☕",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t5",
|
||||
title: "Diskon 50%",
|
||||
category: "Voucher",
|
||||
source: "Penukaran Voucher",
|
||||
points: -5000,
|
||||
type: TransactionType.redeemed,
|
||||
date: DateTime.now().subtract(Duration(days: 5)),
|
||||
productImage: "🏷️",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t6",
|
||||
title: "Gado-gado",
|
||||
category: "Makanan",
|
||||
source: "Transaksi Pembelian",
|
||||
points: 350,
|
||||
type: TransactionType.earned,
|
||||
date: DateTime.now().subtract(Duration(days: 7)),
|
||||
productImage: "🥗",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t7",
|
||||
title: "Hari Kemerdekaan",
|
||||
category: "Event",
|
||||
source: "Bonus Special",
|
||||
points: 1700,
|
||||
type: TransactionType.bonus,
|
||||
date: DateTime.now().subtract(Duration(days: 12)),
|
||||
productImage: "🇮🇩",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t8",
|
||||
title: "Keripik Singkong",
|
||||
category: "Cemilan",
|
||||
source: "Penukaran Voucher",
|
||||
points: -1000,
|
||||
type: TransactionType.redeemed,
|
||||
date: DateTime.now().subtract(Duration(days: 14)),
|
||||
productImage: "🥔",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t9",
|
||||
title: "Review Produk",
|
||||
category: "Aktivitas",
|
||||
source: "Bonus Review",
|
||||
points: 500,
|
||||
type: TransactionType.bonus,
|
||||
date: DateTime.now().subtract(Duration(days: 20)),
|
||||
productImage: "⭐",
|
||||
),
|
||||
PointTransaction(
|
||||
id: "t10",
|
||||
title: "Bakso",
|
||||
category: "Makanan",
|
||||
source: "Pembatalan Pesanan",
|
||||
points: 3000,
|
||||
type: TransactionType.refunded,
|
||||
date: DateTime.now().subtract(Duration(days: 25)),
|
||||
productImage: "🍲",
|
||||
),
|
||||
];
|
||||
|
||||
List<PointTransaction> get filteredTransactions {
|
||||
if (selectedFilter == TransactionType.all) {
|
||||
return allTransactions;
|
||||
}
|
||||
return allTransactions.where((t) => t.type == selectedFilter).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.white,
|
||||
appBar: AppBar(
|
||||
title: Text("Riwayat Poin"),
|
||||
centerTitle: true,
|
||||
elevation: 0,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_buildFilterChips(),
|
||||
Expanded(child: _buildTransactionList()),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFilterChips() {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: TransactionType.values.map((type) {
|
||||
final isSelected = selectedFilter == type;
|
||||
return Container(
|
||||
margin: EdgeInsets.only(right: 8),
|
||||
child: FilterChip(
|
||||
selected: isSelected,
|
||||
label: Text(type.label),
|
||||
onSelected: (selected) {
|
||||
setState(() {
|
||||
selectedFilter = type;
|
||||
});
|
||||
},
|
||||
backgroundColor: AppColor.white,
|
||||
selectedColor: AppColor.primary,
|
||||
checkmarkColor: AppColor.white,
|
||||
labelStyle: AppStyle.sm.copyWith(
|
||||
color: isSelected ? AppColor.white : AppColor.textSecondary,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
side: BorderSide(
|
||||
color: isSelected ? AppColor.primary : AppColor.border,
|
||||
width: 1,
|
||||
),
|
||||
elevation: 0,
|
||||
pressElevation: 1,
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTransactionList() {
|
||||
final transactions = filteredTransactions;
|
||||
|
||||
if (transactions.isEmpty) {
|
||||
return _buildEmptyState();
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
padding: EdgeInsets.all(16),
|
||||
itemCount: transactions.length,
|
||||
itemBuilder: (context, index) {
|
||||
final transaction = transactions[index];
|
||||
return _buildTransactionCard(transaction);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildEmptyState() {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.backgroundLight,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.history_outlined,
|
||||
size: 48,
|
||||
color: AppColor.textLight,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
"Belum Ada Transaksi",
|
||||
style: AppStyle.lg.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.textSecondary,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
"Transaksi ${selectedFilter.label.toLowerCase()}\nbelum tersedia",
|
||||
style: AppStyle.sm.copyWith(color: AppColor.textLight),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTransactionCard(PointTransaction transaction) {
|
||||
final isPositive = transaction.isPositive;
|
||||
final formattedDate = _formatDate(transaction.date);
|
||||
|
||||
return Container(
|
||||
margin: EdgeInsets.only(bottom: 16),
|
||||
padding: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
border: Border(bottom: BorderSide(color: AppColor.border, width: 1)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Category label
|
||||
Text(
|
||||
"Poin Didapat",
|
||||
style: AppStyle.xs.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 8),
|
||||
|
||||
// Title and Points Row
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
transaction.title,
|
||||
style: AppStyle.lg.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColor.textPrimary,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 12),
|
||||
Row(
|
||||
children: [
|
||||
// Green circle icon
|
||||
Container(
|
||||
width: 20,
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
color: isPositive ? Color(0xFF10B981) : AppColor.error,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(Icons.add, color: Colors.white, size: 14),
|
||||
),
|
||||
SizedBox(width: 6),
|
||||
Text(
|
||||
"${isPositive ? '+' : ''}${transaction.points} Poin",
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: isPositive ? Color(0xFF10B981) : AppColor.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(height: 12),
|
||||
|
||||
// Date
|
||||
Text(
|
||||
formattedDate,
|
||||
style: AppStyle.sm.copyWith(color: AppColor.textSecondary),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _formatDate(DateTime date) {
|
||||
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 {
|
||||
final months = [
|
||||
'Jan',
|
||||
'Feb',
|
||||
'Mar',
|
||||
'Apr',
|
||||
'Mei',
|
||||
'Jun',
|
||||
'Jul',
|
||||
'Ags',
|
||||
'Sep',
|
||||
'Okt',
|
||||
'Nov',
|
||||
'Des',
|
||||
];
|
||||
|
||||
return "${date.day} ${months[date.month - 1]} ${date.year}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -268,12 +268,6 @@ class _PoinPageState extends State<PoinPage> {
|
||||
floating: false,
|
||||
pinned: true, // Made sticky
|
||||
snap: false,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.history),
|
||||
onPressed: () => context.router.push(PoinHistoryRoute()),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// Point Card Section
|
||||
|
||||
@ -1,478 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -36,7 +36,6 @@ class AppRouter extends RootStackRouter {
|
||||
|
||||
// Point
|
||||
AutoRoute(page: PoinRoute.page),
|
||||
AutoRoute(page: PoinHistoryRoute.page),
|
||||
AutoRoute(page: ProductRedeemRoute.page),
|
||||
|
||||
// Draw
|
||||
@ -51,8 +50,5 @@ class AppRouter extends RootStackRouter {
|
||||
|
||||
// Order
|
||||
AutoRoute(page: OrderDetailRoute.page),
|
||||
|
||||
// Reward
|
||||
AutoRoute(page: RewardRoute.page),
|
||||
];
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
// coverage:ignore-file
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:auto_route/auto_route.dart' as _i25;
|
||||
import 'package:auto_route/auto_route.dart' as _i23;
|
||||
import 'package:enaklo/presentation/pages/auth/create_password/create_password_page.dart'
|
||||
as _i1;
|
||||
import 'package:enaklo/presentation/pages/auth/login/login_page.dart' as _i5;
|
||||
@ -18,7 +18,7 @@ import 'package:enaklo/presentation/pages/auth/password/password_page.dart'
|
||||
as _i14;
|
||||
import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i15;
|
||||
import 'package:enaklo/presentation/pages/auth/register/register_page.dart'
|
||||
as _i20;
|
||||
as _i19;
|
||||
import 'package:enaklo/presentation/pages/draw/draw_page.dart' as _i3;
|
||||
import 'package:enaklo/presentation/pages/draw/pages/draw_detail/draw_detail_page.dart'
|
||||
as _i2;
|
||||
@ -28,9 +28,9 @@ import 'package:enaklo/presentation/pages/main/pages/home/home_page.dart'
|
||||
import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart'
|
||||
as _i12;
|
||||
import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart'
|
||||
as _i19;
|
||||
as _i18;
|
||||
import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart'
|
||||
as _i24;
|
||||
as _i22;
|
||||
import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i8;
|
||||
import 'package:enaklo/presentation/pages/merchant/pages/merchant_detail/merchant_detail_page.dart'
|
||||
as _i7;
|
||||
@ -40,26 +40,23 @@ 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/poin/pages/poin_history_page.dart'
|
||||
as _i16;
|
||||
import 'package:enaklo/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart'
|
||||
as _i18;
|
||||
import 'package:enaklo/presentation/pages/poin/poin_page.dart' as _i17;
|
||||
import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i21;
|
||||
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i22;
|
||||
as _i17;
|
||||
import 'package:enaklo/presentation/pages/poin/poin_page.dart' as _i16;
|
||||
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i20;
|
||||
import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart'
|
||||
as _i23;
|
||||
import 'package:flutter/material.dart' as _i26;
|
||||
as _i21;
|
||||
import 'package:flutter/material.dart' as _i24;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.CreatePasswordPage]
|
||||
class CreatePasswordRoute extends _i25.PageRouteInfo<void> {
|
||||
const CreatePasswordRoute({List<_i25.PageRouteInfo>? children})
|
||||
class CreatePasswordRoute extends _i23.PageRouteInfo<void> {
|
||||
const CreatePasswordRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(CreatePasswordRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CreatePasswordRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i1.CreatePasswordPage();
|
||||
@ -69,11 +66,11 @@ class CreatePasswordRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.DrawDetailPage]
|
||||
class DrawDetailRoute extends _i25.PageRouteInfo<DrawDetailRouteArgs> {
|
||||
class DrawDetailRoute extends _i23.PageRouteInfo<DrawDetailRouteArgs> {
|
||||
DrawDetailRoute({
|
||||
_i26.Key? key,
|
||||
_i24.Key? key,
|
||||
required _i3.DrawEvent drawEvent,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
List<_i23.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
DrawDetailRoute.name,
|
||||
args: DrawDetailRouteArgs(key: key, drawEvent: drawEvent),
|
||||
@ -82,7 +79,7 @@ class DrawDetailRoute extends _i25.PageRouteInfo<DrawDetailRouteArgs> {
|
||||
|
||||
static const String name = 'DrawDetailRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<DrawDetailRouteArgs>();
|
||||
@ -94,7 +91,7 @@ class DrawDetailRoute extends _i25.PageRouteInfo<DrawDetailRouteArgs> {
|
||||
class DrawDetailRouteArgs {
|
||||
const DrawDetailRouteArgs({this.key, required this.drawEvent});
|
||||
|
||||
final _i26.Key? key;
|
||||
final _i24.Key? key;
|
||||
|
||||
final _i3.DrawEvent drawEvent;
|
||||
|
||||
@ -106,13 +103,13 @@ class DrawDetailRouteArgs {
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.DrawPage]
|
||||
class DrawRoute extends _i25.PageRouteInfo<void> {
|
||||
const DrawRoute({List<_i25.PageRouteInfo>? children})
|
||||
class DrawRoute extends _i23.PageRouteInfo<void> {
|
||||
const DrawRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(DrawRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'DrawRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i3.DrawPage();
|
||||
@ -122,13 +119,13 @@ class DrawRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.HomePage]
|
||||
class HomeRoute extends _i25.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i25.PageRouteInfo>? children})
|
||||
class HomeRoute extends _i23.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(HomeRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i4.HomePage();
|
||||
@ -138,13 +135,13 @@ class HomeRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.LoginPage]
|
||||
class LoginRoute extends _i25.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i25.PageRouteInfo>? children})
|
||||
class LoginRoute extends _i23.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(LoginRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LoginRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i5.LoginPage();
|
||||
@ -154,13 +151,13 @@ class LoginRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.MainPage]
|
||||
class MainRoute extends _i25.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i25.PageRouteInfo>? children})
|
||||
class MainRoute extends _i23.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(MainRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MainRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i6.MainPage();
|
||||
@ -170,11 +167,11 @@ class MainRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.MerchantDetailPage]
|
||||
class MerchantDetailRoute extends _i25.PageRouteInfo<MerchantDetailRouteArgs> {
|
||||
class MerchantDetailRoute extends _i23.PageRouteInfo<MerchantDetailRouteArgs> {
|
||||
MerchantDetailRoute({
|
||||
_i26.Key? key,
|
||||
_i24.Key? key,
|
||||
required _i8.MerchantModel merchant,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
List<_i23.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
MerchantDetailRoute.name,
|
||||
args: MerchantDetailRouteArgs(key: key, merchant: merchant),
|
||||
@ -183,7 +180,7 @@ class MerchantDetailRoute extends _i25.PageRouteInfo<MerchantDetailRouteArgs> {
|
||||
|
||||
static const String name = 'MerchantDetailRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<MerchantDetailRouteArgs>();
|
||||
@ -195,7 +192,7 @@ class MerchantDetailRoute extends _i25.PageRouteInfo<MerchantDetailRouteArgs> {
|
||||
class MerchantDetailRouteArgs {
|
||||
const MerchantDetailRouteArgs({this.key, required this.merchant});
|
||||
|
||||
final _i26.Key? key;
|
||||
final _i24.Key? key;
|
||||
|
||||
final _i8.MerchantModel merchant;
|
||||
|
||||
@ -207,13 +204,13 @@ class MerchantDetailRouteArgs {
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.MerchantPage]
|
||||
class MerchantRoute extends _i25.PageRouteInfo<void> {
|
||||
const MerchantRoute({List<_i25.PageRouteInfo>? children})
|
||||
class MerchantRoute extends _i23.PageRouteInfo<void> {
|
||||
const MerchantRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(MerchantRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MerchantRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i8.MerchantPage();
|
||||
@ -223,13 +220,13 @@ class MerchantRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.NotificationPage]
|
||||
class NotificationRoute extends _i25.PageRouteInfo<void> {
|
||||
const NotificationRoute({List<_i25.PageRouteInfo>? children})
|
||||
class NotificationRoute extends _i23.PageRouteInfo<void> {
|
||||
const NotificationRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(NotificationRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'NotificationRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i9.NotificationPage();
|
||||
@ -239,13 +236,13 @@ class NotificationRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.OnboardingPage]
|
||||
class OnboardingRoute extends _i25.PageRouteInfo<void> {
|
||||
const OnboardingRoute({List<_i25.PageRouteInfo>? children})
|
||||
class OnboardingRoute extends _i23.PageRouteInfo<void> {
|
||||
const OnboardingRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(OnboardingRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OnboardingRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i10.OnboardingPage();
|
||||
@ -255,11 +252,11 @@ class OnboardingRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.OrderDetailPage]
|
||||
class OrderDetailRoute extends _i25.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
class OrderDetailRoute extends _i23.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
OrderDetailRoute({
|
||||
_i26.Key? key,
|
||||
_i24.Key? key,
|
||||
required _i12.Order order,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
List<_i23.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
OrderDetailRoute.name,
|
||||
args: OrderDetailRouteArgs(key: key, order: order),
|
||||
@ -268,7 +265,7 @@ class OrderDetailRoute extends _i25.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
|
||||
static const String name = 'OrderDetailRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<OrderDetailRouteArgs>();
|
||||
@ -280,7 +277,7 @@ class OrderDetailRoute extends _i25.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
class OrderDetailRouteArgs {
|
||||
const OrderDetailRouteArgs({this.key, required this.order});
|
||||
|
||||
final _i26.Key? key;
|
||||
final _i24.Key? key;
|
||||
|
||||
final _i12.Order order;
|
||||
|
||||
@ -292,13 +289,13 @@ class OrderDetailRouteArgs {
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.OrderPage]
|
||||
class OrderRoute extends _i25.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i25.PageRouteInfo>? children})
|
||||
class OrderRoute extends _i23.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(OrderRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OrderRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i12.OrderPage();
|
||||
@ -308,13 +305,13 @@ class OrderRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i13.OtpPage]
|
||||
class OtpRoute extends _i25.PageRouteInfo<void> {
|
||||
const OtpRoute({List<_i25.PageRouteInfo>? children})
|
||||
class OtpRoute extends _i23.PageRouteInfo<void> {
|
||||
const OtpRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(OtpRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OtpRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i13.OtpPage();
|
||||
@ -324,13 +321,13 @@ class OtpRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i14.PasswordPage]
|
||||
class PasswordRoute extends _i25.PageRouteInfo<void> {
|
||||
const PasswordRoute({List<_i25.PageRouteInfo>? children})
|
||||
class PasswordRoute extends _i23.PageRouteInfo<void> {
|
||||
const PasswordRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(PasswordRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'PasswordRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i14.PasswordPage();
|
||||
@ -340,12 +337,12 @@ class PasswordRoute extends _i25.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i15.PinPage]
|
||||
class PinRoute extends _i25.PageRouteInfo<PinRouteArgs> {
|
||||
class PinRoute extends _i23.PageRouteInfo<PinRouteArgs> {
|
||||
PinRoute({
|
||||
_i26.Key? key,
|
||||
_i24.Key? key,
|
||||
bool isCreatePin = true,
|
||||
String? title,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
List<_i23.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
PinRoute.name,
|
||||
args: PinRouteArgs(key: key, isCreatePin: isCreatePin, title: title),
|
||||
@ -354,7 +351,7 @@ class PinRoute extends _i25.PageRouteInfo<PinRouteArgs> {
|
||||
|
||||
static const String name = 'PinRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<PinRouteArgs>(
|
||||
@ -372,7 +369,7 @@ class PinRoute extends _i25.PageRouteInfo<PinRouteArgs> {
|
||||
class PinRouteArgs {
|
||||
const PinRouteArgs({this.key, this.isCreatePin = true, this.title});
|
||||
|
||||
final _i26.Key? key;
|
||||
final _i24.Key? key;
|
||||
|
||||
final bool isCreatePin;
|
||||
|
||||
@ -385,45 +382,29 @@ class PinRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i16.PoinHistoryPage]
|
||||
class PoinHistoryRoute extends _i25.PageRouteInfo<void> {
|
||||
const PoinHistoryRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(PoinHistoryRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'PoinHistoryRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i16.PoinHistoryPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i17.PoinPage]
|
||||
class PoinRoute extends _i25.PageRouteInfo<void> {
|
||||
const PoinRoute({List<_i25.PageRouteInfo>? children})
|
||||
/// [_i16.PoinPage]
|
||||
class PoinRoute extends _i23.PageRouteInfo<void> {
|
||||
const PoinRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(PoinRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'PoinRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i17.PoinPage();
|
||||
return const _i16.PoinPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i18.ProductRedeemPage]
|
||||
class ProductRedeemRoute extends _i25.PageRouteInfo<ProductRedeemRouteArgs> {
|
||||
/// [_i17.ProductRedeemPage]
|
||||
class ProductRedeemRoute extends _i23.PageRouteInfo<ProductRedeemRouteArgs> {
|
||||
ProductRedeemRoute({
|
||||
_i26.Key? key,
|
||||
required _i17.Product product,
|
||||
required _i17.PointCard pointCard,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
_i24.Key? key,
|
||||
required _i16.Product product,
|
||||
required _i16.PointCard pointCard,
|
||||
List<_i23.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ProductRedeemRoute.name,
|
||||
args: ProductRedeemRouteArgs(
|
||||
@ -436,11 +417,11 @@ class ProductRedeemRoute extends _i25.PageRouteInfo<ProductRedeemRouteArgs> {
|
||||
|
||||
static const String name = 'ProductRedeemRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ProductRedeemRouteArgs>();
|
||||
return _i18.ProductRedeemPage(
|
||||
return _i17.ProductRedeemPage(
|
||||
key: args.key,
|
||||
product: args.product,
|
||||
pointCard: args.pointCard,
|
||||
@ -456,11 +437,11 @@ class ProductRedeemRouteArgs {
|
||||
required this.pointCard,
|
||||
});
|
||||
|
||||
final _i26.Key? key;
|
||||
final _i24.Key? key;
|
||||
|
||||
final _i17.Product product;
|
||||
final _i16.Product product;
|
||||
|
||||
final _i17.PointCard pointCard;
|
||||
final _i16.PointCard pointCard;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@ -469,97 +450,81 @@ class ProductRedeemRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i19.ProfilePage]
|
||||
class ProfileRoute extends _i25.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i25.PageRouteInfo>? children})
|
||||
/// [_i18.ProfilePage]
|
||||
class ProfileRoute extends _i23.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(ProfileRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProfileRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i19.ProfilePage();
|
||||
return const _i18.ProfilePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i20.RegisterPage]
|
||||
class RegisterRoute extends _i25.PageRouteInfo<void> {
|
||||
const RegisterRoute({List<_i25.PageRouteInfo>? children})
|
||||
/// [_i19.RegisterPage]
|
||||
class RegisterRoute extends _i23.PageRouteInfo<void> {
|
||||
const RegisterRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(RegisterRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'RegisterRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i20.RegisterPage();
|
||||
return const _i19.RegisterPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i21.RewardPage]
|
||||
class RewardRoute extends _i25.PageRouteInfo<void> {
|
||||
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})
|
||||
/// [_i20.SplashPage]
|
||||
class SplashRoute extends _i23.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(SplashRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SplashRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i22.SplashPage();
|
||||
return const _i20.SplashPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i23.VoucherDetailPage]
|
||||
class VoucherDetailRoute extends _i25.PageRouteInfo<void> {
|
||||
const VoucherDetailRoute({List<_i25.PageRouteInfo>? children})
|
||||
/// [_i21.VoucherDetailPage]
|
||||
class VoucherDetailRoute extends _i23.PageRouteInfo<void> {
|
||||
const VoucherDetailRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(VoucherDetailRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'VoucherDetailRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i23.VoucherDetailPage();
|
||||
return const _i21.VoucherDetailPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i24.VoucherPage]
|
||||
class VoucherRoute extends _i25.PageRouteInfo<void> {
|
||||
const VoucherRoute({List<_i25.PageRouteInfo>? children})
|
||||
/// [_i22.VoucherPage]
|
||||
class VoucherRoute extends _i23.PageRouteInfo<void> {
|
||||
const VoucherRoute({List<_i23.PageRouteInfo>? children})
|
||||
: super(VoucherRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'VoucherRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
static _i23.PageInfo page = _i23.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i24.VoucherPage();
|
||||
return const _i22.VoucherPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user