feat: product redeem page
This commit is contained in:
@@ -33,5 +33,6 @@ class AppRouter extends RootStackRouter {
|
||||
|
||||
// Reward
|
||||
AutoRoute(page: RewardRoute.page),
|
||||
AutoRoute(page: ProductRedeemRoute.page),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -9,37 +9,39 @@
|
||||
// coverage:ignore-file
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:auto_route/auto_route.dart' as _i14;
|
||||
import 'package:auto_route/auto_route.dart' as _i15;
|
||||
import 'package:enaklo/presentation/pages/auth/login/login_page.dart' as _i2;
|
||||
import 'package:enaklo/presentation/pages/auth/otp/otp_page.dart' as _i7;
|
||||
import 'package:enaklo/presentation/pages/auth/pin/pin_page.dart' as _i8;
|
||||
import 'package:enaklo/presentation/pages/auth/register/register_page.dart'
|
||||
as _i10;
|
||||
as _i11;
|
||||
import 'package:enaklo/presentation/pages/main/main_page.dart' as _i3;
|
||||
import 'package:enaklo/presentation/pages/main/pages/home/home_page.dart'
|
||||
as _i1;
|
||||
import 'package:enaklo/presentation/pages/main/pages/order/order_page.dart'
|
||||
as _i6;
|
||||
import 'package:enaklo/presentation/pages/main/pages/profile/profile_page.dart'
|
||||
as _i9;
|
||||
as _i10;
|
||||
import 'package:enaklo/presentation/pages/main/pages/voucher/voucher_page.dart'
|
||||
as _i13;
|
||||
as _i14;
|
||||
import 'package:enaklo/presentation/pages/merchant/merchant_page.dart' as _i4;
|
||||
import 'package:enaklo/presentation/pages/onboarding/onboarding_page.dart'
|
||||
as _i5;
|
||||
import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i11;
|
||||
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i12;
|
||||
import 'package:flutter/material.dart' as _i15;
|
||||
import 'package:enaklo/presentation/pages/reward/pages/product_redeem/product_redeem_page.dart'
|
||||
as _i9;
|
||||
import 'package:enaklo/presentation/pages/reward/reward_page.dart' as _i12;
|
||||
import 'package:enaklo/presentation/pages/splash/splash_page.dart' as _i13;
|
||||
import 'package:flutter/material.dart' as _i16;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.HomePage]
|
||||
class HomeRoute extends _i14.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i14.PageRouteInfo>? children})
|
||||
class HomeRoute extends _i15.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(HomeRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i1.HomePage();
|
||||
@@ -49,13 +51,13 @@ class HomeRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.LoginPage]
|
||||
class LoginRoute extends _i14.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i14.PageRouteInfo>? children})
|
||||
class LoginRoute extends _i15.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(LoginRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LoginRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i2.LoginPage();
|
||||
@@ -65,13 +67,13 @@ class LoginRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.MainPage]
|
||||
class MainRoute extends _i14.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i14.PageRouteInfo>? children})
|
||||
class MainRoute extends _i15.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(MainRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MainRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i3.MainPage();
|
||||
@@ -81,13 +83,13 @@ class MainRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.MerchantPage]
|
||||
class MerchantRoute extends _i14.PageRouteInfo<void> {
|
||||
const MerchantRoute({List<_i14.PageRouteInfo>? children})
|
||||
class MerchantRoute extends _i15.PageRouteInfo<void> {
|
||||
const MerchantRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(MerchantRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MerchantRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i4.MerchantPage();
|
||||
@@ -97,13 +99,13 @@ class MerchantRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.OnboardingPage]
|
||||
class OnboardingRoute extends _i14.PageRouteInfo<void> {
|
||||
const OnboardingRoute({List<_i14.PageRouteInfo>? children})
|
||||
class OnboardingRoute extends _i15.PageRouteInfo<void> {
|
||||
const OnboardingRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(OnboardingRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OnboardingRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i5.OnboardingPage();
|
||||
@@ -113,13 +115,13 @@ class OnboardingRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.OrderPage]
|
||||
class OrderRoute extends _i14.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i14.PageRouteInfo>? children})
|
||||
class OrderRoute extends _i15.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(OrderRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OrderRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i6.OrderPage();
|
||||
@@ -129,13 +131,13 @@ class OrderRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.OtpPage]
|
||||
class OtpRoute extends _i14.PageRouteInfo<void> {
|
||||
const OtpRoute({List<_i14.PageRouteInfo>? children})
|
||||
class OtpRoute extends _i15.PageRouteInfo<void> {
|
||||
const OtpRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(OtpRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OtpRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i7.OtpPage();
|
||||
@@ -145,12 +147,12 @@ class OtpRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.PinPage]
|
||||
class PinRoute extends _i14.PageRouteInfo<PinRouteArgs> {
|
||||
class PinRoute extends _i15.PageRouteInfo<PinRouteArgs> {
|
||||
PinRoute({
|
||||
_i15.Key? key,
|
||||
_i16.Key? key,
|
||||
bool isCreatePin = true,
|
||||
String? title,
|
||||
List<_i14.PageRouteInfo>? children,
|
||||
List<_i15.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
PinRoute.name,
|
||||
args: PinRouteArgs(key: key, isCreatePin: isCreatePin, title: title),
|
||||
@@ -159,7 +161,7 @@ class PinRoute extends _i14.PageRouteInfo<PinRouteArgs> {
|
||||
|
||||
static const String name = 'PinRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<PinRouteArgs>(
|
||||
@@ -177,7 +179,7 @@ class PinRoute extends _i14.PageRouteInfo<PinRouteArgs> {
|
||||
class PinRouteArgs {
|
||||
const PinRouteArgs({this.key, this.isCreatePin = true, this.title});
|
||||
|
||||
final _i15.Key? key;
|
||||
final _i16.Key? key;
|
||||
|
||||
final bool isCreatePin;
|
||||
|
||||
@@ -190,81 +192,139 @@ class PinRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.ProfilePage]
|
||||
class ProfileRoute extends _i14.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i9.ProductRedeemPage]
|
||||
class ProductRedeemRoute extends _i15.PageRouteInfo<ProductRedeemRouteArgs> {
|
||||
ProductRedeemRoute({
|
||||
_i16.Key? key,
|
||||
required _i12.Product product,
|
||||
required _i12.Merchant merchant,
|
||||
required _i12.PointCard pointCard,
|
||||
List<_i15.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ProductRedeemRoute.name,
|
||||
args: ProductRedeemRouteArgs(
|
||||
key: key,
|
||||
product: product,
|
||||
merchant: merchant,
|
||||
pointCard: pointCard,
|
||||
),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'ProductRedeemRoute';
|
||||
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ProductRedeemRouteArgs>();
|
||||
return _i9.ProductRedeemPage(
|
||||
key: args.key,
|
||||
product: args.product,
|
||||
merchant: args.merchant,
|
||||
pointCard: args.pointCard,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class ProductRedeemRouteArgs {
|
||||
const ProductRedeemRouteArgs({
|
||||
this.key,
|
||||
required this.product,
|
||||
required this.merchant,
|
||||
required this.pointCard,
|
||||
});
|
||||
|
||||
final _i16.Key? key;
|
||||
|
||||
final _i12.Product product;
|
||||
|
||||
final _i12.Merchant merchant;
|
||||
|
||||
final _i12.PointCard pointCard;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ProductRedeemRouteArgs{key: $key, product: $product, merchant: $merchant, pointCard: $pointCard}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.ProfilePage]
|
||||
class ProfileRoute extends _i15.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(ProfileRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProfileRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i9.ProfilePage();
|
||||
return const _i10.ProfilePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.RegisterPage]
|
||||
class RegisterRoute extends _i14.PageRouteInfo<void> {
|
||||
const RegisterRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i11.RegisterPage]
|
||||
class RegisterRoute extends _i15.PageRouteInfo<void> {
|
||||
const RegisterRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(RegisterRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'RegisterRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i10.RegisterPage();
|
||||
return const _i11.RegisterPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.RewardPage]
|
||||
class RewardRoute extends _i14.PageRouteInfo<void> {
|
||||
const RewardRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i12.RewardPage]
|
||||
class RewardRoute extends _i15.PageRouteInfo<void> {
|
||||
const RewardRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(RewardRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'RewardRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i11.RewardPage();
|
||||
return const _i12.RewardPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.SplashPage]
|
||||
class SplashRoute extends _i14.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i13.SplashPage]
|
||||
class SplashRoute extends _i15.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(SplashRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SplashRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i12.SplashPage();
|
||||
return const _i13.SplashPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i13.VoucherPage]
|
||||
class VoucherRoute extends _i14.PageRouteInfo<void> {
|
||||
const VoucherRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i14.VoucherPage]
|
||||
class VoucherRoute extends _i15.PageRouteInfo<void> {
|
||||
const VoucherRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(VoucherRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'VoucherRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i13.VoucherPage();
|
||||
return const _i14.VoucherPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user