feat: reward -> poin
This commit is contained in:
parent
2d596a25b9
commit
30a2bece41
@ -16,6 +16,19 @@ class ThemeApp {
|
|||||||
fontFamily: FontFamily.quicksand,
|
fontFamily: FontFamily.quicksand,
|
||||||
primaryColor: AppColor.primary,
|
primaryColor: AppColor.primary,
|
||||||
scaffoldBackgroundColor: AppColor.white,
|
scaffoldBackgroundColor: AppColor.white,
|
||||||
|
textTheme: TextTheme(
|
||||||
|
bodySmall: AppStyle.xs,
|
||||||
|
bodyMedium: AppStyle.md,
|
||||||
|
bodyLarge: AppStyle.lg,
|
||||||
|
labelSmall: AppStyle.sm,
|
||||||
|
labelLarge: AppStyle.xl,
|
||||||
|
headlineSmall: AppStyle.h6,
|
||||||
|
headlineMedium: AppStyle.h5,
|
||||||
|
headlineLarge: AppStyle.h4,
|
||||||
|
displaySmall: AppStyle.h3,
|
||||||
|
displayMedium: AppStyle.h2,
|
||||||
|
displayLarge: AppStyle.h1,
|
||||||
|
),
|
||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
backgroundColor: AppColor.white,
|
backgroundColor: AppColor.white,
|
||||||
foregroundColor: AppColor.textPrimary,
|
foregroundColor: AppColor.textPrimary,
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class HomeFeatureSection extends StatelessWidget {
|
|||||||
icon: Icons.card_giftcard,
|
icon: Icons.card_giftcard,
|
||||||
title: 'Reward',
|
title: 'Reward',
|
||||||
iconColor: const Color(0xFF1976D2),
|
iconColor: const Color(0xFF1976D2),
|
||||||
onTap: () => context.router.push(RewardRoute()),
|
onTap: () {},
|
||||||
),
|
),
|
||||||
HomeFeatureCard(
|
HomeFeatureCard(
|
||||||
icon: Icons.casino,
|
icon: Icons.casino,
|
||||||
|
|||||||
@ -1,13 +1,17 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../../../../common/theme/theme.dart';
|
import '../../../../../../common/theme/theme.dart';
|
||||||
|
import '../../../../../router/app_router.gr.dart';
|
||||||
|
|
||||||
class HomePointCard extends StatelessWidget {
|
class HomePointCard extends StatelessWidget {
|
||||||
const HomePointCard({super.key});
|
const HomePointCard({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return GestureDetector(
|
||||||
|
onTap: () => context.router.push(PoinRoute()),
|
||||||
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.white,
|
color: AppColor.white,
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
@ -135,6 +139,7 @@ class HomePointCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'package:auto_route/auto_route.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../../../common/theme/theme.dart';
|
import '../../../../../common/theme/theme.dart';
|
||||||
import '../../reward_page.dart';
|
import '../../poin_page.dart';
|
||||||
|
|
||||||
@RoutePage()
|
@RoutePage()
|
||||||
class ProductRedeemPage extends StatefulWidget {
|
class ProductRedeemPage extends StatefulWidget {
|
||||||
@ -72,14 +72,14 @@ class Product {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RoutePage()
|
@RoutePage()
|
||||||
class RewardPage extends StatefulWidget {
|
class PoinPage extends StatefulWidget {
|
||||||
const RewardPage({super.key});
|
const PoinPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<RewardPage> createState() => _RewardPageState();
|
State<PoinPage> createState() => _PoinPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _RewardPageState extends State<RewardPage> {
|
class _PoinPageState extends State<PoinPage> {
|
||||||
final ScrollController _scrollController = ScrollController();
|
final ScrollController _scrollController = ScrollController();
|
||||||
|
|
||||||
// Sample data
|
// Sample data
|
||||||
@ -299,14 +299,7 @@ class _RewardPageState extends State<RewardPage> {
|
|||||||
// Sticky AppBar
|
// Sticky AppBar
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
backgroundColor: AppColor.white,
|
title: Text("Poin"),
|
||||||
title: Text(
|
|
||||||
"Rewards",
|
|
||||||
style: AppStyle.h5.copyWith(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppColor.textPrimary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
floating: false,
|
floating: false,
|
||||||
pinned: true, // Made sticky
|
pinned: true, // Made sticky
|
||||||
@ -34,8 +34,8 @@ class AppRouter extends RootStackRouter {
|
|||||||
AutoRoute(page: MerchantRoute.page),
|
AutoRoute(page: MerchantRoute.page),
|
||||||
AutoRoute(page: MerchantDetailRoute.page),
|
AutoRoute(page: MerchantDetailRoute.page),
|
||||||
|
|
||||||
// Reward
|
// Point
|
||||||
AutoRoute(page: RewardRoute.page),
|
AutoRoute(page: PoinRoute.page),
|
||||||
AutoRoute(page: ProductRedeemRoute.page),
|
AutoRoute(page: ProductRedeemRoute.page),
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import 'package:enaklo/presentation/pages/auth/password/password_page.dart'
|
|||||||
as _i14;
|
as _i14;
|
||||||
import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i15;
|
import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i15;
|
||||||
import 'package:enaklo/presentation/pages/auth/register/register_page.dart'
|
import 'package:enaklo/presentation/pages/auth/register/register_page.dart'
|
||||||
as _i18;
|
as _i19;
|
||||||
import 'package:enaklo/presentation/pages/draw/draw_page.dart' as _i3;
|
import 'package:enaklo/presentation/pages/draw/draw_page.dart' as _i3;
|
||||||
import 'package:enaklo/presentation/pages/draw/pages/draw_detail/draw_detail_page.dart'
|
import 'package:enaklo/presentation/pages/draw/pages/draw_detail/draw_detail_page.dart'
|
||||||
as _i2;
|
as _i2;
|
||||||
@ -28,7 +28,7 @@ import 'package:enaklo/presentation/pages/main/pages/home/home_page.dart'
|
|||||||
import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart'
|
import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart'
|
||||||
as _i12;
|
as _i12;
|
||||||
import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart'
|
import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart'
|
||||||
as _i17;
|
as _i18;
|
||||||
import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart'
|
import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart'
|
||||||
as _i22;
|
as _i22;
|
||||||
import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i8;
|
import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i8;
|
||||||
@ -40,9 +40,9 @@ import 'package:enaklo/presentation/pages/onboarding/onboarding_page.dart'
|
|||||||
as _i10;
|
as _i10;
|
||||||
import 'package:enaklo/presentation/pages/order/order_detail/order_detail_page.dart'
|
import 'package:enaklo/presentation/pages/order/order_detail/order_detail_page.dart'
|
||||||
as _i11;
|
as _i11;
|
||||||
import 'package:enaklo/presentation/pages/reward/pages/product_redeem/product_redeem_page.dart'
|
import 'package:enaklo/presentation/pages/poin/pages/product_redeem/product_redeem_page.dart'
|
||||||
as _i16;
|
as _i17;
|
||||||
import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i19;
|
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/splash/splash_page.dart' as _i20;
|
||||||
import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart'
|
import 'package:enaklo/presentation/pages/voucher/voucher_detail/voucher_detail_page.dart'
|
||||||
as _i21;
|
as _i21;
|
||||||
@ -382,13 +382,29 @@ class PinRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i16.ProductRedeemPage]
|
/// [_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 _i23.PageInfo page = _i23.PageInfo(
|
||||||
|
name,
|
||||||
|
builder: (data) {
|
||||||
|
return const _i16.PoinPage();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// generated route for
|
||||||
|
/// [_i17.ProductRedeemPage]
|
||||||
class ProductRedeemRoute extends _i23.PageRouteInfo<ProductRedeemRouteArgs> {
|
class ProductRedeemRoute extends _i23.PageRouteInfo<ProductRedeemRouteArgs> {
|
||||||
ProductRedeemRoute({
|
ProductRedeemRoute({
|
||||||
_i24.Key? key,
|
_i24.Key? key,
|
||||||
required _i19.Product product,
|
required _i16.Product product,
|
||||||
required _i19.Merchant merchant,
|
required _i16.Merchant merchant,
|
||||||
required _i19.PointCard pointCard,
|
required _i16.PointCard pointCard,
|
||||||
List<_i23.PageRouteInfo>? children,
|
List<_i23.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
ProductRedeemRoute.name,
|
ProductRedeemRoute.name,
|
||||||
@ -407,7 +423,7 @@ class ProductRedeemRoute extends _i23.PageRouteInfo<ProductRedeemRouteArgs> {
|
|||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final args = data.argsAs<ProductRedeemRouteArgs>();
|
final args = data.argsAs<ProductRedeemRouteArgs>();
|
||||||
return _i16.ProductRedeemPage(
|
return _i17.ProductRedeemPage(
|
||||||
key: args.key,
|
key: args.key,
|
||||||
product: args.product,
|
product: args.product,
|
||||||
merchant: args.merchant,
|
merchant: args.merchant,
|
||||||
@ -427,11 +443,11 @@ class ProductRedeemRouteArgs {
|
|||||||
|
|
||||||
final _i24.Key? key;
|
final _i24.Key? key;
|
||||||
|
|
||||||
final _i19.Product product;
|
final _i16.Product product;
|
||||||
|
|
||||||
final _i19.Merchant merchant;
|
final _i16.Merchant merchant;
|
||||||
|
|
||||||
final _i19.PointCard pointCard;
|
final _i16.PointCard pointCard;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
@ -440,7 +456,7 @@ class ProductRedeemRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i17.ProfilePage]
|
/// [_i18.ProfilePage]
|
||||||
class ProfileRoute extends _i23.PageRouteInfo<void> {
|
class ProfileRoute extends _i23.PageRouteInfo<void> {
|
||||||
const ProfileRoute({List<_i23.PageRouteInfo>? children})
|
const ProfileRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(ProfileRoute.name, initialChildren: children);
|
: super(ProfileRoute.name, initialChildren: children);
|
||||||
@ -450,13 +466,13 @@ class ProfileRoute extends _i23.PageRouteInfo<void> {
|
|||||||
static _i23.PageInfo page = _i23.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i17.ProfilePage();
|
return const _i18.ProfilePage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i18.RegisterPage]
|
/// [_i19.RegisterPage]
|
||||||
class RegisterRoute extends _i23.PageRouteInfo<void> {
|
class RegisterRoute extends _i23.PageRouteInfo<void> {
|
||||||
const RegisterRoute({List<_i23.PageRouteInfo>? children})
|
const RegisterRoute({List<_i23.PageRouteInfo>? children})
|
||||||
: super(RegisterRoute.name, initialChildren: children);
|
: super(RegisterRoute.name, initialChildren: children);
|
||||||
@ -466,23 +482,7 @@ class RegisterRoute extends _i23.PageRouteInfo<void> {
|
|||||||
static _i23.PageInfo page = _i23.PageInfo(
|
static _i23.PageInfo page = _i23.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i18.RegisterPage();
|
return const _i19.RegisterPage();
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// generated route for
|
|
||||||
/// [_i19.RewardPage]
|
|
||||||
class RewardRoute extends _i23.PageRouteInfo<void> {
|
|
||||||
const RewardRoute({List<_i23.PageRouteInfo>? children})
|
|
||||||
: super(RewardRoute.name, initialChildren: children);
|
|
||||||
|
|
||||||
static const String name = 'RewardRoute';
|
|
||||||
|
|
||||||
static _i23.PageInfo page = _i23.PageInfo(
|
|
||||||
name,
|
|
||||||
builder: (data) {
|
|
||||||
return const _i19.RewardPage();
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user