diff --git a/lib/common/constant/app_constant.dart b/lib/common/constant/app_constant.dart index b0dbc06..33a47ed 100644 --- a/lib/common/constant/app_constant.dart +++ b/lib/common/constant/app_constant.dart @@ -1,3 +1,5 @@ class AppConstant { - static const String appName = ""; + static const String appName = "Enaklo"; + static const String coinName = "EnakCoin"; + static const String poinName = "EnakPoin"; } diff --git a/lib/common/url/api_path.dart b/lib/common/url/api_path.dart index cf51d59..73854c9 100644 --- a/lib/common/url/api_path.dart +++ b/lib/common/url/api_path.dart @@ -8,6 +8,7 @@ class ApiPath { // Marketing static String ferrisWheel = '/api/v1/customer/ferris-wheel'; + // Customer static String customerPoint = '/api/v1/customer/points'; } diff --git a/lib/presentation/components/card/gradient_card.dart b/lib/presentation/components/card/gradient_card.dart new file mode 100644 index 0000000..31bbb11 --- /dev/null +++ b/lib/presentation/components/card/gradient_card.dart @@ -0,0 +1,118 @@ +import 'package:flutter/material.dart'; + +import '../../../common/theme/theme.dart'; + +class GradientCard extends StatelessWidget { + final Widget child; + final List? gradientColors; + final double borderRadius; + final EdgeInsetsGeometry? padding; + final bool showDecoration; + + const GradientCard({ + super.key, + required this.child, + this.gradientColors, + this.borderRadius = 16, + this.padding = const EdgeInsets.all(16.0), + this.showDecoration = true, + }); + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + gradient: LinearGradient( + colors: gradientColors ?? AppColor.primaryGradient, + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + borderRadius: BorderRadius.circular(borderRadius), + ), + child: Stack( + children: [ + // Background Pattern (optional) + if (showDecoration) ..._buildDecorations(), + // Main Content + Padding(padding: padding ?? EdgeInsets.zero, child: child), + ], + ), + ); + } + + List _buildDecorations() { + return [ + // Top Right Circle + Positioned( + top: -20, + right: -20, + child: Container( + width: 80, + height: 80, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.white.withOpacity(0.1), + ), + ), + ), + // Middle Right Circle + Positioned( + top: 30, + right: 20, + child: Container( + width: 40, + height: 40, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.white.withOpacity(0.08), + ), + ), + ), + // Bottom Left Circle + Positioned( + bottom: -10, + left: -10, + child: Container( + width: 60, + height: 60, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.white.withOpacity(0.06), + ), + ), + ), + // Top Left Decorative Line + Positioned( + top: 10, + left: -5, + child: Transform.rotate( + angle: 0.5, + child: Container( + width: 30, + height: 2, + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.15), + borderRadius: BorderRadius.circular(1), + ), + ), + ), + ), + // Bottom Right Decorative Line + Positioned( + bottom: 15, + right: 10, + child: Transform.rotate( + angle: -0.5, + child: Container( + width: 25, + height: 2, + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.15), + borderRadius: BorderRadius.circular(1), + ), + ), + ), + ), + ]; + } +} diff --git a/lib/presentation/pages/poin/poin_page.dart b/lib/presentation/pages/coin/coin_page.dart similarity index 99% rename from lib/presentation/pages/poin/poin_page.dart rename to lib/presentation/pages/coin/coin_page.dart index b94665a..c725073 100644 --- a/lib/presentation/pages/poin/poin_page.dart +++ b/lib/presentation/pages/coin/coin_page.dart @@ -60,14 +60,14 @@ class Product { } @RoutePage() -class PoinPage extends StatefulWidget { - const PoinPage({super.key}); +class CoinPage extends StatefulWidget { + const CoinPage({super.key}); @override - State createState() => _PoinPageState(); + State createState() => _CoinPageState(); } -class _PoinPageState extends State { +class _CoinPageState extends State { final ScrollController _scrollController = ScrollController(); // Sample data - Indonesian content @@ -276,7 +276,7 @@ class _PoinPageState extends State { actions: [ IconButton( icon: Icon(Icons.history), - onPressed: () => context.router.push(PoinHistoryRoute()), + onPressed: () => context.router.push(CoinHistoryRoute()), ), ], ), diff --git a/lib/presentation/pages/poin/pages/poin_history_page.dart b/lib/presentation/pages/coin/pages/coin_history_page.dart similarity index 98% rename from lib/presentation/pages/poin/pages/poin_history_page.dart rename to lib/presentation/pages/coin/pages/coin_history_page.dart index 391d30c..cb83c98 100644 --- a/lib/presentation/pages/poin/pages/poin_history_page.dart +++ b/lib/presentation/pages/coin/pages/coin_history_page.dart @@ -43,14 +43,14 @@ class PointTransaction { } @RoutePage() -class PoinHistoryPage extends StatefulWidget { - const PoinHistoryPage({super.key}); +class CoinHistoryPage extends StatefulWidget { + const CoinHistoryPage({super.key}); @override - State createState() => _PoinHistoryPageState(); + State createState() => _CoinHistoryPageState(); } -class _PoinHistoryPageState extends State { +class _CoinHistoryPageState extends State { TransactionType selectedFilter = TransactionType.all; // Sample transaction data diff --git a/lib/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart b/lib/presentation/pages/coin/pages/product_redeem/product_redeem_page.dart similarity index 99% rename from lib/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart rename to lib/presentation/pages/coin/pages/product_redeem/product_redeem_page.dart index 635c410..a355e22 100644 --- a/lib/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart +++ b/lib/presentation/pages/coin/pages/product_redeem/product_redeem_page.dart @@ -2,7 +2,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import '../../../../../common/theme/theme.dart'; -import '../../poin_page.dart'; +import '../../coin_page.dart'; @RoutePage() class ProductRedeemPage extends StatefulWidget { diff --git a/lib/presentation/pages/main/main_page.dart b/lib/presentation/pages/main/main_page.dart index 6e46d27..41ef4e8 100644 --- a/lib/presentation/pages/main/main_page.dart +++ b/lib/presentation/pages/main/main_page.dart @@ -24,7 +24,12 @@ class _MainPageState extends State { @override Widget build(BuildContext context) { return AutoTabsRouter.pageView( - routes: [HomeRoute(), VoucherRoute(), OrderRoute(), ProfileRoute()], + routes: [ + HomeRoute(), + // VoucherRoute(), + OrderRoute(), + ProfileRoute(), + ], physics: const NeverScrollableScrollPhysics(), builder: (context, child, pageController) => Scaffold( body: child, diff --git a/lib/presentation/pages/main/pages/home/widgets/feature_section.dart b/lib/presentation/pages/main/pages/home/widgets/feature_section.dart index ff7d443..0c8cb8a 100644 --- a/lib/presentation/pages/main/pages/home/widgets/feature_section.dart +++ b/lib/presentation/pages/main/pages/home/widgets/feature_section.dart @@ -1,66 +1,60 @@ -import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import '../../../../../../application/auth/auth_bloc.dart'; -import '../../../../../router/app_router.gr.dart'; -import 'feature_card.dart'; + +import '../../../../../../common/theme/theme.dart'; +import '../../../../../components/card/gradient_card.dart'; class HomeFeatureSection extends StatelessWidget { const HomeFeatureSection({super.key}); @override Widget build(BuildContext context) { - return BlocBuilder( - builder: (context, state) { - return Container( - padding: const EdgeInsets.all(16), - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - HomeFeatureCard( - icon: Icons.card_giftcard, - title: 'Reward', - iconColor: const Color(0xFF1976D2), - onTap: () => context.router.push(RewardRoute()), - ), - SizedBox(width: 12), - HomeFeatureCard( - icon: Icons.casino, - title: 'Undian', - iconColor: const Color(0xFF7B1FA2), - onTap: () => context.router.push(DrawRoute()), - ), - SizedBox(width: 12), - HomeFeatureCard( - icon: Icons.store, - title: 'Merchant', - iconColor: const Color(0xFF388E3C), - onTap: () => context.router.push(MerchantRoute()), - ), - SizedBox(width: 12), - HomeFeatureCard( - icon: Icons.blur_circular, - title: 'Wheels', - iconColor: const Color(0xFF388E3C), - onTap: () => state.isAuthenticated - ? context.router.push(FerrisWheelRoute()) - : context.router.push(OnboardingRoute()), - ), - SizedBox(width: 12), - HomeFeatureCard( - icon: Icons.storage_outlined, - title: 'Mistery Box', - iconColor: const Color(0xFF388E3C), - onTap: () => state.isAuthenticated - ? context.router.push(MisteryBoxRoute()) - : context.router.push(OnboardingRoute()), - ), - ], + return Padding( + padding: const EdgeInsets.all(16), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: GradientCard( + child: _content( + 'Dine In', + 'Rasakan Sensasi Langsung di Meja Kami!', + ), ), ), - ); - }, + SizedBox(width: 16), + Expanded( + child: GradientCard( + child: _content( + 'Take Away', + 'Nikmati di Mana Saja, Tetap Mantap!', + ), + ), + ), + ], + ), + ); + } + + Column _content(String title, String subtitle) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: AppStyle.lg.copyWith( + color: AppColor.white, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 8), + Text( + subtitle, + style: AppStyle.md.copyWith( + color: AppColor.white, + fontWeight: FontWeight.w500, + ), + ), + ], ); } } diff --git a/lib/presentation/pages/main/pages/home/widgets/point_card.dart b/lib/presentation/pages/main/pages/home/widgets/point_card.dart index 779276a..bea986b 100644 --- a/lib/presentation/pages/main/pages/home/widgets/point_card.dart +++ b/lib/presentation/pages/main/pages/home/widgets/point_card.dart @@ -16,7 +16,7 @@ class HomePointCard extends StatelessWidget { builder: (context, state) { return GestureDetector( onTap: () => state.isAuthenticated - ? context.router.push(PoinRoute()) + ? context.router.push(CoinRoute()) : context.router.push(OnboardingRoute()), child: Container( decoration: BoxDecoration( diff --git a/lib/presentation/pages/main/pages/profile/profile_page.dart b/lib/presentation/pages/main/pages/profile/profile_page.dart index 94cb39b..98b3140 100644 --- a/lib/presentation/pages/main/pages/profile/profile_page.dart +++ b/lib/presentation/pages/main/pages/profile/profile_page.dart @@ -6,6 +6,7 @@ import '../../../../../application/auth/auth_bloc.dart'; import '../../../../../application/auth/logout_form/logout_form_bloc.dart'; import '../../../../../common/theme/theme.dart'; import '../../../../../injection.dart'; +import '../../../../components/card/gradient_card.dart'; import '../../../../components/toast/flushbar.dart'; import '../../../../router/app_router.gr.dart'; @@ -46,165 +47,81 @@ class ProfilePage extends StatelessWidget implements AutoRouteWrapper { onTap: () => state.isAuthenticated ? context.router.push(AccountMyRoute()) : context.router.push(OnboardingRoute()), - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient( - colors: AppColor.primaryGradient, - begin: Alignment.topLeft, - end: Alignment.bottomRight, - ), - borderRadius: BorderRadius.circular(16), - ), - child: Stack( - children: [ - // Background Pattern - Positioned( - top: -20, - right: -20, - child: Container( - width: 80, - height: 80, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: AppColor.white.withOpacity(0.1), - ), - ), - ), - Positioned( - top: 30, - right: 20, - child: Container( - width: 40, - height: 40, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: AppColor.white.withOpacity(0.08), - ), - ), - ), - Positioned( - bottom: -10, - left: -10, - child: Container( - width: 60, - height: 60, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: AppColor.white.withOpacity(0.06), - ), - ), - ), - // Decorative Lines - Positioned( - top: 10, - left: -5, - child: Transform.rotate( - angle: 0.5, - child: Container( - width: 30, - height: 2, - decoration: BoxDecoration( - color: AppColor.white.withOpacity(0.15), - borderRadius: BorderRadius.circular(1), + child: GradientCard( + child: !state.isAuthenticated + ? Row( + children: [ + Expanded( + child: Text( + 'Silahkan Masuk', + style: AppStyle.lg.copyWith( + fontWeight: FontWeight.bold, + color: AppColor.white, + letterSpacing: 0.5, + ), + ), ), - ), - ), - ), - Positioned( - bottom: 15, - right: 10, - child: Transform.rotate( - angle: -0.5, - child: Container( - width: 25, - height: 2, - decoration: BoxDecoration( - color: AppColor.white.withOpacity(0.15), - borderRadius: BorderRadius.circular(1), - ), - ), - ), - ), - // Main Content - Padding( - padding: const EdgeInsets.all(16.0), - child: !state.isAuthenticated - ? Row( - children: [ - Expanded( - child: Text( - 'Silahkan Masuk', - style: AppStyle.lg.copyWith( - fontWeight: FontWeight.bold, - color: AppColor.white, - letterSpacing: 0.5, - ), + ], + ) + : Row( + children: [ + // Avatar + Container( + width: 60, + height: 60, + decoration: BoxDecoration( + color: AppColor.white, + shape: BoxShape.circle, + boxShadow: [ + BoxShadow( + color: AppColor.black.withOpacity( + 0.1, ), - ), - ], - ) - : Row( - children: [ - // Avatar - Container( - width: 60, - height: 60, - decoration: BoxDecoration( - color: AppColor.white, - shape: BoxShape.circle, - boxShadow: [ - BoxShadow( - color: AppColor.black - .withOpacity(0.1), - blurRadius: 8, - offset: const Offset(0, 2), - ), - ], - ), - child: Icon( - Icons.person, - size: 30, - color: AppColor.primary, - ), - ), - const SizedBox(width: 16), - // User Info - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - state.user.name, - style: AppStyle.lg.copyWith( - fontWeight: - FontWeight.bold, - color: AppColor.white, - letterSpacing: 0.5, - ), - ), - const SizedBox(height: 4), - Text( - state.user.phoneNumber, - style: AppStyle.sm.copyWith( - color: AppColor.white - .withOpacity(0.9), - ), - ), - ], - ), - ), - // Arrow Icon - Icon( - Icons.arrow_forward_ios, - color: AppColor.white, - size: 14, + blurRadius: 8, + offset: const Offset(0, 2), ), ], ), - ), - ], - ), + child: Icon( + Icons.person, + size: 30, + color: AppColor.primary, + ), + ), + const SizedBox(width: 16), + // User Info + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + state.user.name, + style: AppStyle.lg.copyWith( + fontWeight: FontWeight.bold, + color: AppColor.white, + letterSpacing: 0.5, + ), + ), + const SizedBox(height: 4), + Text( + state.user.phoneNumber, + style: AppStyle.sm.copyWith( + color: AppColor.white + .withOpacity(0.9), + ), + ), + ], + ), + ), + // Arrow Icon + Icon( + Icons.arrow_forward_ios, + color: AppColor.white, + size: 14, + ), + ], + ), ), ), ], diff --git a/lib/presentation/pages/main/widgets/bottom_navbar.dart b/lib/presentation/pages/main/widgets/bottom_navbar.dart index adb2625..49dd7c4 100644 --- a/lib/presentation/pages/main/widgets/bottom_navbar.dart +++ b/lib/presentation/pages/main/widgets/bottom_navbar.dart @@ -18,11 +18,11 @@ class MainBottomNavbar extends StatelessWidget { label: 'Home', tooltip: 'Home', ), - BottomNavigationBarItem( - icon: Icon(Icons.discount), - label: 'Voucher', - tooltip: 'Voucher', - ), + // BottomNavigationBarItem( + // icon: Icon(Icons.discount), + // label: 'Voucher', + // tooltip: 'Voucher', + // ), BottomNavigationBarItem( icon: Icon(Icons.list), label: 'Pesanan', diff --git a/lib/presentation/pages/point/point_page.dart b/lib/presentation/pages/point/point_page.dart new file mode 100644 index 0000000..3b13606 --- /dev/null +++ b/lib/presentation/pages/point/point_page.dart @@ -0,0 +1,541 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'dart:math' as math; + +import '../../../common/constant/app_constant.dart'; +import '../../../common/theme/theme.dart'; + +@RoutePage() +class PointPage extends StatefulWidget { + const PointPage({super.key}); + + @override + State createState() => _PointPageState(); +} + +class _PointPageState extends State { + int _currentPage = 0; + final PageController _pageController = PageController(viewportFraction: 1.0); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: SingleChildScrollView( + child: Column( + children: [ + // Pink Header with overlapping elements + Stack( + clipBehavior: Clip.none, + children: [ + // Pink Background + Container( + height: 320, + width: double.infinity, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + AppColor.primary.withOpacity(0.8), + AppColor.primary, + ], + ), + ), + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(24.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Back Button + Container( + width: 56, + height: 56, + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.3), + shape: BoxShape.circle, + ), + child: IconButton( + icon: const Icon( + Icons.arrow_back, + color: Colors.white, + size: 28, + ), + onPressed: () => Navigator.pop(context), + ), + ), + + const SizedBox(height: 32), + + // Title + Text( + 'Kelola ${AppConstant.poinName} kamu!', + style: AppStyle.h3.copyWith( + color: AppColor.white, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 8), + // Subtitle + Text( + 'Bisa kumpulin dan tukar dari sini.', + style: AppStyle.md.copyWith( + color: AppColor.white.withOpacity(0.9), + ), + ), + ], + ), + ), + ), + ), + + // Point Card - Overlapping + Positioned( + top: 280, + left: 24, + right: 24, + child: Container( + padding: const EdgeInsets.all(20), + decoration: BoxDecoration( + color: AppColor.white, + borderRadius: BorderRadius.circular(20), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.1), + blurRadius: 10, + offset: const Offset(0, 2), + ), + ], + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 56, + height: 56, + decoration: BoxDecoration( + color: AppColor.primary, + shape: BoxShape.circle, + ), + child: const Icon( + Icons.card_giftcard, + color: Colors.white, + size: 32, + ), + ), + const SizedBox(width: 16), + Text( + '50 ${AppConstant.poinName}', + style: AppStyle.h4.copyWith( + color: AppColor.primary, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ), + ], + ), + + // Black Section + const SizedBox(height: 100), + + Container( + color: Colors.white, + width: double.infinity, + child: Column( + children: [ + // Title Section + Padding( + padding: const EdgeInsets.symmetric(horizontal: 24.0), + child: Column( + children: [ + Text( + 'Tukar ${AppConstant.poinName} buat seru-seruan', + style: AppStyle.h4.copyWith( + color: AppColor.textPrimary, + fontWeight: FontWeight.bold, + ), + textAlign: TextAlign.center, + ), + ], + ), + ), + + const SizedBox(height: 40), + + // PageView - Show 2 items per page + SizedBox( + height: 340, + child: PageView( + controller: _pageController, + + onPageChanged: (index) { + setState(() { + _currentPage = index; + }); + }, + children: [ + // Page 1 - 2 cards + Row( + children: [ + Expanded( + child: _buildRewardCard( + title: 'Main Gift Arena\nsekarang!', + subtitle: 'Dapetin s.d. 1jt Coins!', + buttonText: 'Pakai 50 💎', + isWheel: true, + ), + ), + Expanded( + child: _buildRewardCard( + title: 'Putar untuk\nHarapan', + subtitle: 'GoPay Pet', + buttonText: 'Pakai 5 💎', + isWheel: false, + ), + ), + ], + ), + // Page 2 - 2 cards + Row( + children: [ + Expanded( + child: _buildRewardCard( + title: 'Spin & Win\nHadiah!', + subtitle: 'Kesempatan menang besar!', + buttonText: 'Pakai 30 💎', + isWheel: true, + ), + ), + Expanded( + child: _buildRewardCard( + title: 'Lucky Draw\nBerhadiah', + subtitle: 'Coba keberuntungan!', + buttonText: 'Pakai 20 💎', + isWheel: false, + ), + ), + ], + ), + // Page 3 - 1 card + Row( + children: [ + Expanded( + child: _buildRewardCard( + title: 'Mega Prize\nWheel', + subtitle: 'Hadiah hingga 10jt!', + buttonText: 'Pakai 100 💎', + isWheel: true, + ), + ), + const Spacer(), // Empty space for alignment + ], + ), + ], + ), + ), + + const SizedBox(height: 20), + + // Indicators - 3 pages + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: List.generate(3, (index) { + return AnimatedContainer( + duration: const Duration(milliseconds: 300), + margin: const EdgeInsets.symmetric(horizontal: 4), + width: _currentPage == index ? 28 : 8, + height: 8, + decoration: BoxDecoration( + color: _currentPage == index + ? AppColor.primary + : Colors.grey.withOpacity(0.3), + borderRadius: BorderRadius.circular(4), + ), + ); + }), + ), + + const SizedBox(height: 40), + + // Bottom Text + Padding( + padding: const EdgeInsets.symmetric(horizontal: 24.0), + child: Column( + children: [ + Text( + 'Ada banyak cara dapet ${AppConstant.poinName}', + style: AppStyle.h5.copyWith( + color: AppColor.textPrimary, + fontWeight: FontWeight.bold, + ), + textAlign: TextAlign.center, + ), + const SizedBox(height: 8), + Text( + 'Mulai dari main game sampai nonton video.', + style: AppStyle.sm.copyWith( + color: AppColor.textLight, + ), + textAlign: TextAlign.center, + ), + ], + ), + ), + const SizedBox(height: 60), + ], + ), + ), + ], + ), + ), + ); + } + + Widget _buildRewardCard({ + required String title, + required String subtitle, + required String buttonText, + required bool isWheel, + }) { + return Padding( + padding: const EdgeInsets.only(left: 16), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 20), + decoration: BoxDecoration( + color: const Color(0xFF2D2D2D), + borderRadius: BorderRadius.circular(24), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // Icon + Container( + width: 120, + height: 120, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: isWheel + ? const Color(0xFF4FC3F7) + : const Color(0xFFFFC107), + boxShadow: [ + BoxShadow( + color: + (isWheel + ? const Color(0xFF4FC3F7) + : const Color(0xFFFFC107)) + .withOpacity(0.3), + blurRadius: 20, + spreadRadius: 5, + ), + ], + ), + child: Center( + child: Container( + width: 120, + height: 120, + decoration: const BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + ), + child: isWheel + ? CustomPaint(painter: WheelPainter()) + : CustomPaint(painter: CoinPainter()), + ), + ), + ), + + const SizedBox(height: 20), + + Text( + title, + style: AppStyle.md.copyWith( + color: AppColor.white, + fontWeight: FontWeight.bold, + height: 1.3, + ), + textAlign: TextAlign.center, + ), + + const SizedBox(height: 6), + + Text( + subtitle, + style: AppStyle.sm.copyWith(color: AppColor.textLight), + textAlign: TextAlign.center, + ), + + const SizedBox(height: 18), + + ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: AppColor.primary, + padding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 12, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + elevation: 0, + ), + child: Text( + buttonText, + style: AppStyle.sm.copyWith( + color: AppColor.white, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + ), + ); + } +} + +class WheelPainter extends CustomPainter { + @override + void paint(Canvas canvas, Size size) { + final center = Offset(size.width / 2, size.height / 2); + final radius = size.width / 2; + + // Draw wheel segments + final paint = Paint()..style = PaintingStyle.fill; + + const segments = 8; + final sweepAngle = (2 * math.pi) / segments; + + for (int i = 0; i < segments; i++) { + paint.color = i.isEven + ? const Color(0xFF2196F3) + : const Color(0xFF90CAF9); + + canvas.drawArc( + Rect.fromCircle(center: center, radius: radius * 0.9), + i * sweepAngle, + sweepAngle, + true, + paint, + ); + } + + // Draw center circle + paint.color = const Color(0xFFFFEB3B); + canvas.drawCircle(center, radius * 0.25, paint); + + // Draw pointer at top + final pointerPaint = Paint() + ..color = const Color(0xFFE91E63) + ..style = PaintingStyle.fill; + + final pointerPath = Path(); + pointerPath.moveTo(center.dx, radius * 0.15); + pointerPath.lineTo(center.dx - radius * 0.15, 0); + pointerPath.lineTo(center.dx + radius * 0.15, 0); + pointerPath.close(); + + canvas.drawPath(pointerPath, pointerPaint); + + // Draw white border on pointer + final borderPaint = Paint() + ..color = Colors.white + ..style = PaintingStyle.stroke + ..strokeWidth = 3; + canvas.drawPath(pointerPath, borderPaint); + + // Draw dots around edge + paint.color = const Color(0xFF4FC3F7); + for (int i = 0; i < 12; i++) { + final angle = (i * 2 * math.pi) / 12; + final x = center.dx + radius * 0.95 * math.cos(angle); + final y = center.dy + radius * 0.95 * math.sin(angle); + canvas.drawCircle(Offset(x, y), 4, paint); + } + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => false; +} + +class CoinPainter extends CustomPainter { + @override + void paint(Canvas canvas, Size size) { + final center = Offset(size.width / 2, size.height / 2); + final radius = size.width / 2; + + // Draw outer ring + final ringPaint = Paint() + ..color = const Color(0xFFD4A418) + ..style = PaintingStyle.stroke + ..strokeWidth = 8; + canvas.drawCircle(center, radius * 0.85, ringPaint); + + // Draw inner circle + final innerPaint = Paint() + ..color = const Color(0xFFFFC107) + ..style = PaintingStyle.fill; + canvas.drawCircle(center, radius * 0.75, innerPaint); + + // Draw center ring symbol + final centerRingPaint = Paint() + ..color = const Color(0xFFD4A418) + ..style = PaintingStyle.stroke + ..strokeWidth = 6; + canvas.drawCircle(center, radius * 0.35, centerRingPaint); + + // Draw small colored dots around + final colors = [ + Colors.red, + Colors.blue, + Colors.green, + Colors.purple, + Colors.orange, + Colors.pink, + ]; + + for (int i = 0; i < 6; i++) { + final angle = (i * 2 * math.pi) / 6; + final x = center.dx + radius * 0.6 * math.cos(angle); + final y = center.dy + radius * 0.6 * math.sin(angle); + + final dotPaint = Paint() + ..color = colors[i] + ..style = PaintingStyle.fill; + canvas.drawCircle(Offset(x, y), 6, dotPaint); + } + + // Draw numbers around edge + final textPainter = TextPainter( + textDirection: TextDirection.ltr, + textAlign: TextAlign.center, + ); + + for (int i = 0; i < 12; i++) { + final angle = (i * 2 * math.pi) / 12 - math.pi / 2; + final x = center.dx + radius * 0.85 * math.cos(angle); + final y = center.dy + radius * 0.85 * math.sin(angle); + + textPainter.text = TextSpan( + text: '${(i + 1) * 10}', + style: const TextStyle( + color: Color(0xFFD4A418), + fontSize: 10, + fontWeight: FontWeight.bold, + ), + ); + textPainter.layout(); + textPainter.paint( + canvas, + Offset(x - textPainter.width / 2, y - textPainter.height / 2), + ); + } + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => false; +} diff --git a/lib/presentation/router/app_router.dart b/lib/presentation/router/app_router.dart index 1104f6a..5644e54 100644 --- a/lib/presentation/router/app_router.dart +++ b/lib/presentation/router/app_router.dart @@ -35,8 +35,11 @@ class AppRouter extends RootStackRouter { AutoRoute(page: MerchantDetailRoute.page), // Point - AutoRoute(page: PoinRoute.page), - AutoRoute(page: PoinHistoryRoute.page), + AutoRoute(page: PointRoute.page), + + // Coint + AutoRoute(page: CoinRoute.page), + AutoRoute(page: CoinHistoryRoute.page), AutoRoute(page: ProductRedeemRoute.page), // Draw diff --git a/lib/presentation/router/app_router.gr.dart b/lib/presentation/router/app_router.gr.dart index 22e0e5b..1d18605 100644 --- a/lib/presentation/router/app_router.gr.dart +++ b/lib/presentation/router/app_router.gr.dart @@ -9,76 +9,77 @@ // coverage:ignore-file // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'package:auto_route/auto_route.dart' as _i34; +import 'package:auto_route/auto_route.dart' as _i35; import 'package:enaklo/presentation/pages/account/account_my/account_my_page.dart' as _i1; import 'package:enaklo/presentation/pages/account/address/address_page.dart' as _i2; import 'package:enaklo/presentation/pages/account/payment/payment_page.dart' - as _i23; -import 'package:enaklo/presentation/pages/auth/create_password/create_password_page.dart' - as _i3; -import 'package:enaklo/presentation/pages/auth/login/login_page.dart' as _i12; -import 'package:enaklo/presentation/pages/auth/otp/otp_page.dart' as _i21; -import 'package:enaklo/presentation/pages/auth/password/password_page.dart' - as _i22; -import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i24; -import 'package:enaklo/presentation/pages/auth/register/register_page.dart' - as _i29; -import 'package:enaklo/presentation/pages/draw/draw_page.dart' as _i7; -import 'package:enaklo/presentation/pages/draw/pages/draw_detail/draw_detail_page.dart' - as _i4; -import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_info_page.dart' - as _i5; -import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_my_number_page.dart' - as _i6; -import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_today_page.dart' - as _i8; -import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_winner_page.dart' - as _i9; -import 'package:enaklo/presentation/pages/main/main_page.dart' as _i13; -import 'package:enaklo/presentation/pages/main/pages/home/home_page.dart' - as _i11; -import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart' - as _i20; -import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart' - as _i28; -import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart' - as _i33; -import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i15; -import 'package:enaklo/presentation/pages/merchant/pages/merchant_detail/merchant_detail_page.dart' - as _i14; -import 'package:enaklo/presentation/pages/mini_games/ferris_wheel/ferris_wheel_page.dart' - as _i10; -import 'package:enaklo/presentation/pages/mini_games/mistery_box/mistery_box_page.dart' - as _i16; -import 'package:enaklo/presentation/pages/notification/notification_page.dart' - as _i17; -import 'package:enaklo/presentation/pages/onboarding/onboarding_page.dart' - as _i18; -import 'package:enaklo/presentation/pages/order/order_detail/order_detail_page.dart' - as _i19; -import 'package:enaklo/presentation/pages/poin/pages/poin_history_page.dart' as _i25; -import 'package:enaklo/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart' - as _i27; -import 'package:enaklo/presentation/pages/poin/poin_page.dart' as _i26; -import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i30; -import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i31; +import 'package:enaklo/presentation/pages/auth/create_password/create_password_page.dart' + as _i5; +import 'package:enaklo/presentation/pages/auth/login/login_page.dart' as _i14; +import 'package:enaklo/presentation/pages/auth/otp/otp_page.dart' as _i23; +import 'package:enaklo/presentation/pages/auth/password/password_page.dart' + as _i24; +import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i26; +import 'package:enaklo/presentation/pages/auth/register/register_page.dart' + as _i30; +import 'package:enaklo/presentation/pages/coin/coin_page.dart' as _i4; +import 'package:enaklo/presentation/pages/coin/pages/coin_history_page.dart' + as _i3; +import 'package:enaklo/presentation/pages/coin/pages/product_redeem/product_redeem_page.dart' + as _i28; +import 'package:enaklo/presentation/pages/draw/draw_page.dart' as _i9; +import 'package:enaklo/presentation/pages/draw/pages/draw_detail/draw_detail_page.dart' + as _i6; +import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_info_page.dart' + as _i7; +import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_my_number_page.dart' + as _i8; +import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_today_page.dart' + as _i10; +import 'package:enaklo/presentation/pages/draw/pages/draw_detail/pages/draw_winner_page.dart' + as _i11; +import 'package:enaklo/presentation/pages/main/main_page.dart' as _i15; +import 'package:enaklo/presentation/pages/main/pages/home/home_page.dart' + as _i13; +import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart' + as _i22; +import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart' + as _i29; +import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart' + as _i34; +import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i17; +import 'package:enaklo/presentation/pages/merchant/pages/merchant_detail/merchant_detail_page.dart' + as _i16; +import 'package:enaklo/presentation/pages/mini_games/ferris_wheel/ferris_wheel_page.dart' + as _i12; +import 'package:enaklo/presentation/pages/mini_games/mistery_box/mistery_box_page.dart' + as _i18; +import 'package:enaklo/presentation/pages/notification/notification_page.dart' + as _i19; +import 'package:enaklo/presentation/pages/onboarding/onboarding_page.dart' + as _i20; +import 'package:enaklo/presentation/pages/order/order_detail/order_detail_page.dart' + as _i21; +import 'package:enaklo/presentation/pages/point/point_page.dart' as _i27; +import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i31; +import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i32; import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart' - as _i32; -import 'package:enaklo/sample/sample_data.dart' as _i36; -import 'package:flutter/material.dart' as _i35; + as _i33; +import 'package:enaklo/sample/sample_data.dart' as _i37; +import 'package:flutter/material.dart' as _i36; /// generated route for /// [_i1.AccountMyPage] -class AccountMyRoute extends _i34.PageRouteInfo { - const AccountMyRoute({List<_i34.PageRouteInfo>? children}) +class AccountMyRoute extends _i35.PageRouteInfo { + const AccountMyRoute({List<_i35.PageRouteInfo>? children}) : super(AccountMyRoute.name, initialChildren: children); static const String name = 'AccountMyRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { return const _i1.AccountMyPage(); @@ -88,13 +89,13 @@ class AccountMyRoute extends _i34.PageRouteInfo { /// generated route for /// [_i2.AddressPage] -class AddressRoute extends _i34.PageRouteInfo { - const AddressRoute({List<_i34.PageRouteInfo>? children}) +class AddressRoute extends _i35.PageRouteInfo { + const AddressRoute({List<_i35.PageRouteInfo>? children}) : super(AddressRoute.name, initialChildren: children); static const String name = 'AddressRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { return const _i2.AddressPage(); @@ -103,12 +104,44 @@ class AddressRoute extends _i34.PageRouteInfo { } /// generated route for -/// [_i3.CreatePasswordPage] -class CreatePasswordRoute extends _i34.PageRouteInfo { +/// [_i3.CoinHistoryPage] +class CoinHistoryRoute extends _i35.PageRouteInfo { + const CoinHistoryRoute({List<_i35.PageRouteInfo>? children}) + : super(CoinHistoryRoute.name, initialChildren: children); + + static const String name = 'CoinHistoryRoute'; + + static _i35.PageInfo page = _i35.PageInfo( + name, + builder: (data) { + return const _i3.CoinHistoryPage(); + }, + ); +} + +/// generated route for +/// [_i4.CoinPage] +class CoinRoute extends _i35.PageRouteInfo { + const CoinRoute({List<_i35.PageRouteInfo>? children}) + : super(CoinRoute.name, initialChildren: children); + + static const String name = 'CoinRoute'; + + static _i35.PageInfo page = _i35.PageInfo( + name, + builder: (data) { + return const _i4.CoinPage(); + }, + ); +} + +/// generated route for +/// [_i5.CreatePasswordPage] +class CreatePasswordRoute extends _i35.PageRouteInfo { CreatePasswordRoute({ - _i35.Key? key, + _i36.Key? key, required String registrationToken, - List<_i34.PageRouteInfo>? children, + List<_i35.PageRouteInfo>? children, }) : super( CreatePasswordRoute.name, args: CreatePasswordRouteArgs( @@ -120,12 +153,12 @@ class CreatePasswordRoute extends _i34.PageRouteInfo { static const String name = 'CreatePasswordRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs(); - return _i34.WrappedRoute( - child: _i3.CreatePasswordPage( + return _i35.WrappedRoute( + child: _i5.CreatePasswordPage( key: args.key, registrationToken: args.registrationToken, ), @@ -137,7 +170,7 @@ class CreatePasswordRoute extends _i34.PageRouteInfo { class CreatePasswordRouteArgs { const CreatePasswordRouteArgs({this.key, required this.registrationToken}); - final _i35.Key? key; + final _i36.Key? key; final String registrationToken; @@ -148,172 +181,172 @@ class CreatePasswordRouteArgs { } /// generated route for -/// [_i4.DrawDetailPage] -class DrawDetailRoute extends _i34.PageRouteInfo { - const DrawDetailRoute({List<_i34.PageRouteInfo>? children}) +/// [_i6.DrawDetailPage] +class DrawDetailRoute extends _i35.PageRouteInfo { + const DrawDetailRoute({List<_i35.PageRouteInfo>? children}) : super(DrawDetailRoute.name, initialChildren: children); static const String name = 'DrawDetailRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i4.DrawDetailPage(); + return const _i6.DrawDetailPage(); }, ); } /// generated route for -/// [_i5.DrawInfoPage] -class DrawInfoRoute extends _i34.PageRouteInfo { - const DrawInfoRoute({List<_i34.PageRouteInfo>? children}) +/// [_i7.DrawInfoPage] +class DrawInfoRoute extends _i35.PageRouteInfo { + const DrawInfoRoute({List<_i35.PageRouteInfo>? children}) : super(DrawInfoRoute.name, initialChildren: children); static const String name = 'DrawInfoRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i5.DrawInfoPage(); + return const _i7.DrawInfoPage(); }, ); } /// generated route for -/// [_i6.DrawMyNumberPage] -class DrawMyNumberRoute extends _i34.PageRouteInfo { - const DrawMyNumberRoute({List<_i34.PageRouteInfo>? children}) +/// [_i8.DrawMyNumberPage] +class DrawMyNumberRoute extends _i35.PageRouteInfo { + const DrawMyNumberRoute({List<_i35.PageRouteInfo>? children}) : super(DrawMyNumberRoute.name, initialChildren: children); static const String name = 'DrawMyNumberRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i6.DrawMyNumberPage(); + return const _i8.DrawMyNumberPage(); }, ); } /// generated route for -/// [_i7.DrawPage] -class DrawRoute extends _i34.PageRouteInfo { - const DrawRoute({List<_i34.PageRouteInfo>? children}) +/// [_i9.DrawPage] +class DrawRoute extends _i35.PageRouteInfo { + const DrawRoute({List<_i35.PageRouteInfo>? children}) : super(DrawRoute.name, initialChildren: children); static const String name = 'DrawRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i7.DrawPage(); + return const _i9.DrawPage(); }, ); } /// generated route for -/// [_i8.DrawTodayPage] -class DrawTodayRoute extends _i34.PageRouteInfo { - const DrawTodayRoute({List<_i34.PageRouteInfo>? children}) +/// [_i10.DrawTodayPage] +class DrawTodayRoute extends _i35.PageRouteInfo { + const DrawTodayRoute({List<_i35.PageRouteInfo>? children}) : super(DrawTodayRoute.name, initialChildren: children); static const String name = 'DrawTodayRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i8.DrawTodayPage(); + return const _i10.DrawTodayPage(); }, ); } /// generated route for -/// [_i9.DrawWinnerPage] -class DrawWinnerRoute extends _i34.PageRouteInfo { - const DrawWinnerRoute({List<_i34.PageRouteInfo>? children}) +/// [_i11.DrawWinnerPage] +class DrawWinnerRoute extends _i35.PageRouteInfo { + const DrawWinnerRoute({List<_i35.PageRouteInfo>? children}) : super(DrawWinnerRoute.name, initialChildren: children); static const String name = 'DrawWinnerRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i9.DrawWinnerPage(); + return const _i11.DrawWinnerPage(); }, ); } /// generated route for -/// [_i10.FerrisWheelPage] -class FerrisWheelRoute extends _i34.PageRouteInfo { - const FerrisWheelRoute({List<_i34.PageRouteInfo>? children}) +/// [_i12.FerrisWheelPage] +class FerrisWheelRoute extends _i35.PageRouteInfo { + const FerrisWheelRoute({List<_i35.PageRouteInfo>? children}) : super(FerrisWheelRoute.name, initialChildren: children); static const String name = 'FerrisWheelRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return _i34.WrappedRoute(child: const _i10.FerrisWheelPage()); + return _i35.WrappedRoute(child: const _i12.FerrisWheelPage()); }, ); } /// generated route for -/// [_i11.HomePage] -class HomeRoute extends _i34.PageRouteInfo { - const HomeRoute({List<_i34.PageRouteInfo>? children}) +/// [_i13.HomePage] +class HomeRoute extends _i35.PageRouteInfo { + const HomeRoute({List<_i35.PageRouteInfo>? children}) : super(HomeRoute.name, initialChildren: children); static const String name = 'HomeRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i11.HomePage(); + return const _i13.HomePage(); }, ); } /// generated route for -/// [_i12.LoginPage] -class LoginRoute extends _i34.PageRouteInfo { - const LoginRoute({List<_i34.PageRouteInfo>? children}) +/// [_i14.LoginPage] +class LoginRoute extends _i35.PageRouteInfo { + const LoginRoute({List<_i35.PageRouteInfo>? children}) : super(LoginRoute.name, initialChildren: children); static const String name = 'LoginRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return _i34.WrappedRoute(child: const _i12.LoginPage()); + return _i35.WrappedRoute(child: const _i14.LoginPage()); }, ); } /// generated route for -/// [_i13.MainPage] -class MainRoute extends _i34.PageRouteInfo { - const MainRoute({List<_i34.PageRouteInfo>? children}) +/// [_i15.MainPage] +class MainRoute extends _i35.PageRouteInfo { + const MainRoute({List<_i35.PageRouteInfo>? children}) : super(MainRoute.name, initialChildren: children); static const String name = 'MainRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i13.MainPage(); + return const _i15.MainPage(); }, ); } /// generated route for -/// [_i14.MerchantDetailPage] -class MerchantDetailRoute extends _i34.PageRouteInfo { +/// [_i16.MerchantDetailPage] +class MerchantDetailRoute extends _i35.PageRouteInfo { MerchantDetailRoute({ - _i35.Key? key, - required _i36.MerchantModel merchant, - List<_i34.PageRouteInfo>? children, + _i36.Key? key, + required _i37.MerchantModel merchant, + List<_i35.PageRouteInfo>? children, }) : super( MerchantDetailRoute.name, args: MerchantDetailRouteArgs(key: key, merchant: merchant), @@ -322,11 +355,11 @@ class MerchantDetailRoute extends _i34.PageRouteInfo { static const String name = 'MerchantDetailRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs(); - return _i14.MerchantDetailPage(key: args.key, merchant: args.merchant); + return _i16.MerchantDetailPage(key: args.key, merchant: args.merchant); }, ); } @@ -334,9 +367,9 @@ class MerchantDetailRoute extends _i34.PageRouteInfo { class MerchantDetailRouteArgs { const MerchantDetailRouteArgs({this.key, required this.merchant}); - final _i35.Key? key; + final _i36.Key? key; - final _i36.MerchantModel merchant; + final _i37.MerchantModel merchant; @override String toString() { @@ -345,76 +378,76 @@ class MerchantDetailRouteArgs { } /// generated route for -/// [_i15.MerchantPage] -class MerchantRoute extends _i34.PageRouteInfo { - const MerchantRoute({List<_i34.PageRouteInfo>? children}) +/// [_i17.MerchantPage] +class MerchantRoute extends _i35.PageRouteInfo { + const MerchantRoute({List<_i35.PageRouteInfo>? children}) : super(MerchantRoute.name, initialChildren: children); static const String name = 'MerchantRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i15.MerchantPage(); + return const _i17.MerchantPage(); }, ); } /// generated route for -/// [_i16.MisteryBoxPage] -class MisteryBoxRoute extends _i34.PageRouteInfo { - const MisteryBoxRoute({List<_i34.PageRouteInfo>? children}) +/// [_i18.MisteryBoxPage] +class MisteryBoxRoute extends _i35.PageRouteInfo { + const MisteryBoxRoute({List<_i35.PageRouteInfo>? children}) : super(MisteryBoxRoute.name, initialChildren: children); static const String name = 'MisteryBoxRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i16.MisteryBoxPage(); + return const _i18.MisteryBoxPage(); }, ); } /// generated route for -/// [_i17.NotificationPage] -class NotificationRoute extends _i34.PageRouteInfo { - const NotificationRoute({List<_i34.PageRouteInfo>? children}) +/// [_i19.NotificationPage] +class NotificationRoute extends _i35.PageRouteInfo { + const NotificationRoute({List<_i35.PageRouteInfo>? children}) : super(NotificationRoute.name, initialChildren: children); static const String name = 'NotificationRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i17.NotificationPage(); + return const _i19.NotificationPage(); }, ); } /// generated route for -/// [_i18.OnboardingPage] -class OnboardingRoute extends _i34.PageRouteInfo { - const OnboardingRoute({List<_i34.PageRouteInfo>? children}) +/// [_i20.OnboardingPage] +class OnboardingRoute extends _i35.PageRouteInfo { + const OnboardingRoute({List<_i35.PageRouteInfo>? children}) : super(OnboardingRoute.name, initialChildren: children); static const String name = 'OnboardingRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i18.OnboardingPage(); + return const _i20.OnboardingPage(); }, ); } /// generated route for -/// [_i19.OrderDetailPage] -class OrderDetailRoute extends _i34.PageRouteInfo { +/// [_i21.OrderDetailPage] +class OrderDetailRoute extends _i35.PageRouteInfo { OrderDetailRoute({ - _i35.Key? key, - required _i20.Order order, - List<_i34.PageRouteInfo>? children, + _i36.Key? key, + required _i22.Order order, + List<_i35.PageRouteInfo>? children, }) : super( OrderDetailRoute.name, args: OrderDetailRouteArgs(key: key, order: order), @@ -423,11 +456,11 @@ class OrderDetailRoute extends _i34.PageRouteInfo { static const String name = 'OrderDetailRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs(); - return _i19.OrderDetailPage(key: args.key, order: args.order); + return _i21.OrderDetailPage(key: args.key, order: args.order); }, ); } @@ -435,9 +468,9 @@ class OrderDetailRoute extends _i34.PageRouteInfo { class OrderDetailRouteArgs { const OrderDetailRouteArgs({this.key, required this.order}); - final _i35.Key? key; + final _i36.Key? key; - final _i20.Order order; + final _i22.Order order; @override String toString() { @@ -446,29 +479,29 @@ class OrderDetailRouteArgs { } /// generated route for -/// [_i20.OrderPage] -class OrderRoute extends _i34.PageRouteInfo { - const OrderRoute({List<_i34.PageRouteInfo>? children}) +/// [_i22.OrderPage] +class OrderRoute extends _i35.PageRouteInfo { + const OrderRoute({List<_i35.PageRouteInfo>? children}) : super(OrderRoute.name, initialChildren: children); static const String name = 'OrderRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i20.OrderPage(); + return const _i22.OrderPage(); }, ); } /// generated route for -/// [_i21.OtpPage] -class OtpRoute extends _i34.PageRouteInfo { +/// [_i23.OtpPage] +class OtpRoute extends _i35.PageRouteInfo { OtpRoute({ - _i35.Key? key, + _i36.Key? key, required String registrationToken, required String phoneNumber, - List<_i34.PageRouteInfo>? children, + List<_i35.PageRouteInfo>? children, }) : super( OtpRoute.name, args: OtpRouteArgs( @@ -481,12 +514,12 @@ class OtpRoute extends _i34.PageRouteInfo { static const String name = 'OtpRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs(); - return _i34.WrappedRoute( - child: _i21.OtpPage( + return _i35.WrappedRoute( + child: _i23.OtpPage( key: args.key, registrationToken: args.registrationToken, phoneNumber: args.phoneNumber, @@ -503,7 +536,7 @@ class OtpRouteArgs { required this.phoneNumber, }); - final _i35.Key? key; + final _i36.Key? key; final String registrationToken; @@ -516,12 +549,12 @@ class OtpRouteArgs { } /// generated route for -/// [_i22.PasswordPage] -class PasswordRoute extends _i34.PageRouteInfo { +/// [_i24.PasswordPage] +class PasswordRoute extends _i35.PageRouteInfo { PasswordRoute({ - _i35.Key? key, + _i36.Key? key, required String phoneNumber, - List<_i34.PageRouteInfo>? children, + List<_i35.PageRouteInfo>? children, }) : super( PasswordRoute.name, args: PasswordRouteArgs(key: key, phoneNumber: phoneNumber), @@ -530,12 +563,12 @@ class PasswordRoute extends _i34.PageRouteInfo { static const String name = 'PasswordRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs(); - return _i34.WrappedRoute( - child: _i22.PasswordPage(key: args.key, phoneNumber: args.phoneNumber), + return _i35.WrappedRoute( + child: _i24.PasswordPage(key: args.key, phoneNumber: args.phoneNumber), ); }, ); @@ -544,7 +577,7 @@ class PasswordRoute extends _i34.PageRouteInfo { class PasswordRouteArgs { const PasswordRouteArgs({this.key, required this.phoneNumber}); - final _i35.Key? key; + final _i36.Key? key; final String phoneNumber; @@ -555,29 +588,29 @@ class PasswordRouteArgs { } /// generated route for -/// [_i23.PaymentPage] -class PaymentRoute extends _i34.PageRouteInfo { - const PaymentRoute({List<_i34.PageRouteInfo>? children}) +/// [_i25.PaymentPage] +class PaymentRoute extends _i35.PageRouteInfo { + const PaymentRoute({List<_i35.PageRouteInfo>? children}) : super(PaymentRoute.name, initialChildren: children); static const String name = 'PaymentRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i23.PaymentPage(); + return const _i25.PaymentPage(); }, ); } /// generated route for -/// [_i24.PinPage] -class PinRoute extends _i34.PageRouteInfo { +/// [_i26.PinPage] +class PinRoute extends _i35.PageRouteInfo { PinRoute({ - _i35.Key? key, + _i36.Key? key, bool isCreatePin = true, String? title, - List<_i34.PageRouteInfo>? children, + List<_i35.PageRouteInfo>? children, }) : super( PinRoute.name, args: PinRouteArgs(key: key, isCreatePin: isCreatePin, title: title), @@ -586,13 +619,13 @@ class PinRoute extends _i34.PageRouteInfo { static const String name = 'PinRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs( orElse: () => const PinRouteArgs(), ); - return _i24.PinPage( + return _i26.PinPage( key: args.key, isCreatePin: args.isCreatePin, title: args.title, @@ -604,7 +637,7 @@ class PinRoute extends _i34.PageRouteInfo { class PinRouteArgs { const PinRouteArgs({this.key, this.isCreatePin = true, this.title}); - final _i35.Key? key; + final _i36.Key? key; final bool isCreatePin; @@ -617,45 +650,29 @@ class PinRouteArgs { } /// generated route for -/// [_i25.PoinHistoryPage] -class PoinHistoryRoute extends _i34.PageRouteInfo { - const PoinHistoryRoute({List<_i34.PageRouteInfo>? children}) - : super(PoinHistoryRoute.name, initialChildren: children); +/// [_i27.PointPage] +class PointRoute extends _i35.PageRouteInfo { + const PointRoute({List<_i35.PageRouteInfo>? children}) + : super(PointRoute.name, initialChildren: children); - static const String name = 'PoinHistoryRoute'; + static const String name = 'PointRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i25.PoinHistoryPage(); + return const _i27.PointPage(); }, ); } /// generated route for -/// [_i26.PoinPage] -class PoinRoute extends _i34.PageRouteInfo { - const PoinRoute({List<_i34.PageRouteInfo>? children}) - : super(PoinRoute.name, initialChildren: children); - - static const String name = 'PoinRoute'; - - static _i34.PageInfo page = _i34.PageInfo( - name, - builder: (data) { - return const _i26.PoinPage(); - }, - ); -} - -/// generated route for -/// [_i27.ProductRedeemPage] -class ProductRedeemRoute extends _i34.PageRouteInfo { +/// [_i28.ProductRedeemPage] +class ProductRedeemRoute extends _i35.PageRouteInfo { ProductRedeemRoute({ - _i35.Key? key, - required _i26.Product product, - required _i26.PointCard pointCard, - List<_i34.PageRouteInfo>? children, + _i36.Key? key, + required _i4.Product product, + required _i4.PointCard pointCard, + List<_i35.PageRouteInfo>? children, }) : super( ProductRedeemRoute.name, args: ProductRedeemRouteArgs( @@ -668,11 +685,11 @@ class ProductRedeemRoute extends _i34.PageRouteInfo { static const String name = 'ProductRedeemRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs(); - return _i27.ProductRedeemPage( + return _i28.ProductRedeemPage( key: args.key, product: args.product, pointCard: args.pointCard, @@ -688,11 +705,11 @@ class ProductRedeemRouteArgs { required this.pointCard, }); - final _i35.Key? key; + final _i36.Key? key; - final _i26.Product product; + final _i4.Product product; - final _i26.PointCard pointCard; + final _i4.PointCard pointCard; @override String toString() { @@ -701,28 +718,28 @@ class ProductRedeemRouteArgs { } /// generated route for -/// [_i28.ProfilePage] -class ProfileRoute extends _i34.PageRouteInfo { - const ProfileRoute({List<_i34.PageRouteInfo>? children}) +/// [_i29.ProfilePage] +class ProfileRoute extends _i35.PageRouteInfo { + const ProfileRoute({List<_i35.PageRouteInfo>? children}) : super(ProfileRoute.name, initialChildren: children); static const String name = 'ProfileRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return _i34.WrappedRoute(child: const _i28.ProfilePage()); + return _i35.WrappedRoute(child: const _i29.ProfilePage()); }, ); } /// generated route for -/// [_i29.RegisterPage] -class RegisterRoute extends _i34.PageRouteInfo { +/// [_i30.RegisterPage] +class RegisterRoute extends _i35.PageRouteInfo { RegisterRoute({ - _i35.Key? key, + _i36.Key? key, required String phoneNumber, - List<_i34.PageRouteInfo>? children, + List<_i35.PageRouteInfo>? children, }) : super( RegisterRoute.name, args: RegisterRouteArgs(key: key, phoneNumber: phoneNumber), @@ -731,12 +748,12 @@ class RegisterRoute extends _i34.PageRouteInfo { static const String name = 'RegisterRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { final args = data.argsAs(); - return _i34.WrappedRoute( - child: _i29.RegisterPage(key: args.key, phoneNumber: args.phoneNumber), + return _i35.WrappedRoute( + child: _i30.RegisterPage(key: args.key, phoneNumber: args.phoneNumber), ); }, ); @@ -745,7 +762,7 @@ class RegisterRoute extends _i34.PageRouteInfo { class RegisterRouteArgs { const RegisterRouteArgs({this.key, required this.phoneNumber}); - final _i35.Key? key; + final _i36.Key? key; final String phoneNumber; @@ -756,65 +773,65 @@ class RegisterRouteArgs { } /// generated route for -/// [_i30.RewardPage] -class RewardRoute extends _i34.PageRouteInfo { - const RewardRoute({List<_i34.PageRouteInfo>? children}) +/// [_i31.RewardPage] +class RewardRoute extends _i35.PageRouteInfo { + const RewardRoute({List<_i35.PageRouteInfo>? children}) : super(RewardRoute.name, initialChildren: children); static const String name = 'RewardRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i30.RewardPage(); + return const _i31.RewardPage(); }, ); } /// generated route for -/// [_i31.SplashPage] -class SplashRoute extends _i34.PageRouteInfo { - const SplashRoute({List<_i34.PageRouteInfo>? children}) +/// [_i32.SplashPage] +class SplashRoute extends _i35.PageRouteInfo { + const SplashRoute({List<_i35.PageRouteInfo>? children}) : super(SplashRoute.name, initialChildren: children); static const String name = 'SplashRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i31.SplashPage(); + return const _i32.SplashPage(); }, ); } /// generated route for -/// [_i32.VoucherDetailPage] -class VoucherDetailRoute extends _i34.PageRouteInfo { - const VoucherDetailRoute({List<_i34.PageRouteInfo>? children}) +/// [_i33.VoucherDetailPage] +class VoucherDetailRoute extends _i35.PageRouteInfo { + const VoucherDetailRoute({List<_i35.PageRouteInfo>? children}) : super(VoucherDetailRoute.name, initialChildren: children); static const String name = 'VoucherDetailRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i32.VoucherDetailPage(); + return const _i33.VoucherDetailPage(); }, ); } /// generated route for -/// [_i33.VoucherPage] -class VoucherRoute extends _i34.PageRouteInfo { - const VoucherRoute({List<_i34.PageRouteInfo>? children}) +/// [_i34.VoucherPage] +class VoucherRoute extends _i35.PageRouteInfo { + const VoucherRoute({List<_i35.PageRouteInfo>? children}) : super(VoucherRoute.name, initialChildren: children); static const String name = 'VoucherRoute'; - static _i34.PageInfo page = _i34.PageInfo( + static _i35.PageInfo page = _i35.PageInfo( name, builder: (data) { - return const _i33.VoucherPage(); + return const _i34.VoucherPage(); }, ); } diff --git a/macos/Podfile b/macos/Podfile index 29c8eb3..ff5ddb3 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.14' +platform :osx, '10.15' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index fc5d148..ee2d4d6 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -461,7 +461,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -543,7 +543,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -593,7 +593,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/pubspec.lock b/pubspec.lock index 7ee8410..750851a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -668,26 +668,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -1121,10 +1121,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" time: dependency: transitive description: @@ -1249,10 +1249,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: