feat: change password
This commit is contained in:
+104
@@ -0,0 +1,104 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../../application/user/change_password_form/change_password_form_bloc.dart';
|
||||
import '../../../../../common/theme/theme.dart';
|
||||
import '../../../../../injection.dart';
|
||||
import '../../../../components/appbar/appbar.dart';
|
||||
import '../../../../components/button/button.dart';
|
||||
import '../../../../components/spacer/spacer.dart';
|
||||
import '../../../../components/toast/flushbar.dart';
|
||||
import 'widgets/current_password.dart';
|
||||
import 'widgets/new_password.dart';
|
||||
|
||||
@RoutePage()
|
||||
class ProfileChangePasswordPage extends StatefulWidget
|
||||
implements AutoRouteWrapper {
|
||||
const ProfileChangePasswordPage({super.key});
|
||||
|
||||
@override
|
||||
State<ProfileChangePasswordPage> createState() =>
|
||||
_ProfileChangePasswordPageState();
|
||||
|
||||
@override
|
||||
Widget wrappedRoute(BuildContext context) =>
|
||||
BlocProvider(create: (_) => getIt<ChangePasswordFormBloc>(), child: this);
|
||||
}
|
||||
|
||||
class _ProfileChangePasswordPageState extends State<ProfileChangePasswordPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocListener<ChangePasswordFormBloc, ChangePasswordFormState>(
|
||||
listener: (context, state) {
|
||||
state.failureOrChangePasswordOption.fold(
|
||||
() => null,
|
||||
(either) => either.fold(
|
||||
(f) => AppFlushbar.showUserFailureToast(context, f),
|
||||
(user) {
|
||||
if (context.mounted) {
|
||||
AppFlushbar.showSuccess(context, 'Password changed');
|
||||
Future.delayed(const Duration(seconds: 2), () {
|
||||
context.router.back();
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColor.background,
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
// SliverAppBar with gradient
|
||||
SliverAppBar(
|
||||
expandedHeight: 120,
|
||||
floating: false,
|
||||
pinned: true,
|
||||
elevation: 0,
|
||||
backgroundColor: AppColor.primary,
|
||||
flexibleSpace: CustomAppBar(title: 'Change Password'),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child:
|
||||
BlocBuilder<ChangePasswordFormBloc, ChangePasswordFormState>(
|
||||
builder: (context, state) {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(AppValue.margin),
|
||||
padding: EdgeInsets.all(AppValue.padding),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(AppValue.radius),
|
||||
),
|
||||
child: Form(
|
||||
autovalidateMode: state.showErrorMessages
|
||||
? AutovalidateMode.always
|
||||
: AutovalidateMode.disabled,
|
||||
child: Column(
|
||||
children: [
|
||||
ChangePasswordCurrentPassword(),
|
||||
SpaceHeight(16),
|
||||
ChangePasswordNewPassword(),
|
||||
SpaceHeight(24),
|
||||
AppElevatedButton(
|
||||
text: 'Save',
|
||||
isLoading: state.isSubmitting,
|
||||
onPressed: () {
|
||||
context.read<ChangePasswordFormBloc>().add(
|
||||
ChangePasswordFormEvent.submitted(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:line_icons/line_icons.dart';
|
||||
|
||||
import '../../../../../../application/user/change_password_form/change_password_form_bloc.dart';
|
||||
import '../../../../../components/field/field.dart';
|
||||
|
||||
class ChangePasswordCurrentPassword extends StatelessWidget {
|
||||
const ChangePasswordCurrentPassword({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppPasswordTextFormField(
|
||||
title: 'Current Password',
|
||||
prefixIcon: LineIcons.lock,
|
||||
hintText: 'Please enter your current password',
|
||||
onChanged: (value) => context.read<ChangePasswordFormBloc>().add(
|
||||
ChangePasswordFormEvent.currentPasswordChanged(value),
|
||||
),
|
||||
validator: (value) {
|
||||
if (context
|
||||
.read<ChangePasswordFormBloc>()
|
||||
.state
|
||||
.currentPassword
|
||||
.isEmpty) {
|
||||
return 'Please enter your current password';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:line_icons/line_icons.dart';
|
||||
|
||||
import '../../../../../../application/user/change_password_form/change_password_form_bloc.dart';
|
||||
import '../../../../../components/field/field.dart';
|
||||
|
||||
class ChangePasswordNewPassword extends StatelessWidget {
|
||||
const ChangePasswordNewPassword({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppPasswordTextFormField(
|
||||
title: 'New Password',
|
||||
prefixIcon: LineIcons.lock,
|
||||
hintText: 'Please enter your new password',
|
||||
onChanged: (value) => context.read<ChangePasswordFormBloc>().add(
|
||||
ChangePasswordFormEvent.newPasswordChanged(value),
|
||||
),
|
||||
validator: (value) {
|
||||
if (context.read<ChangePasswordFormBloc>().state.newPassword.isEmpty) {
|
||||
return 'Please enter your new password';
|
||||
}
|
||||
|
||||
if (context.read<ChangePasswordFormBloc>().state.newPassword ==
|
||||
context.read<ChangePasswordFormBloc>().state.currentPassword) {
|
||||
return 'New password cannot be same as current password';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,13 @@ class ProfileAccountInfo extends StatelessWidget {
|
||||
subtitle: 'Ubah profil kamu',
|
||||
onTap: () => context.router.push(ProfileEditRoute(user: user)),
|
||||
),
|
||||
ProfileDivider(),
|
||||
ProfileTile(
|
||||
icon: LineIcons.lock,
|
||||
title: 'Change Password',
|
||||
subtitle: 'Change your password',
|
||||
onTap: () => context.router.push(ProfileChangePasswordRoute()),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -61,6 +61,7 @@ class AppRouter extends RootStackRouter {
|
||||
|
||||
// Profile
|
||||
AutoRoute(page: ProfileEditRoute.page),
|
||||
AutoRoute(page: ProfileChangePasswordRoute.page),
|
||||
|
||||
// Error
|
||||
AutoRoute(page: ErrorRoute.page),
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
// coverage:ignore-file
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:apskel_owner_flutter/domain/order/order.dart' as _i26;
|
||||
import 'package:apskel_owner_flutter/domain/user/user.dart' as _i27;
|
||||
import 'package:apskel_owner_flutter/domain/order/order.dart' as _i27;
|
||||
import 'package:apskel_owner_flutter/domain/user/user.dart' as _i28;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/auth/login/login_page.dart'
|
||||
as _i10;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/coming_soon/coming_soon_page.dart'
|
||||
@@ -43,32 +43,34 @@ import 'package:apskel_owner_flutter/presentation/pages/product/product_analytic
|
||||
as _i15;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/product/product_list/product_page.dart'
|
||||
as _i16;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/pages/profile_edit/profile_edit_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/pages/profile_change_password/profile_change_password_page.dart'
|
||||
as _i17;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/pages/profile_edit/profile_edit_page.dart'
|
||||
as _i18;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/purchase/purchase_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
||||
as _i19;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/purchase/purchase_page.dart'
|
||||
as _i20;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/sales/sales_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
||||
as _i21;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/sales/sales_page.dart'
|
||||
as _i22;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart'
|
||||
as _i23;
|
||||
import 'package:auto_route/auto_route.dart' as _i24;
|
||||
import 'package:flutter/material.dart' as _i25;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
||||
as _i24;
|
||||
import 'package:auto_route/auto_route.dart' as _i25;
|
||||
import 'package:flutter/material.dart' as _i26;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.ComingSoonPage]
|
||||
class ComingSoonRoute extends _i24.PageRouteInfo<void> {
|
||||
const ComingSoonRoute({List<_i24.PageRouteInfo>? children})
|
||||
class ComingSoonRoute extends _i25.PageRouteInfo<void> {
|
||||
const ComingSoonRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(ComingSoonRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ComingSoonRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i1.ComingSoonPage();
|
||||
@@ -78,29 +80,29 @@ class ComingSoonRoute extends _i24.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.CustomerPage]
|
||||
class CustomerRoute extends _i24.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i24.PageRouteInfo>? children})
|
||||
class CustomerRoute extends _i25.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(CustomerRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CustomerRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i2.CustomerPage());
|
||||
return _i25.WrappedRoute(child: const _i2.CustomerPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.DailyTasksFormPage]
|
||||
class DailyTasksFormRoute extends _i24.PageRouteInfo<void> {
|
||||
const DailyTasksFormRoute({List<_i24.PageRouteInfo>? children})
|
||||
class DailyTasksFormRoute extends _i25.PageRouteInfo<void> {
|
||||
const DailyTasksFormRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(DailyTasksFormRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'DailyTasksFormRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i3.DailyTasksFormPage();
|
||||
@@ -110,13 +112,13 @@ class DailyTasksFormRoute extends _i24.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.DownloadReportPage]
|
||||
class DownloadReportRoute extends _i24.PageRouteInfo<void> {
|
||||
const DownloadReportRoute({List<_i24.PageRouteInfo>? children})
|
||||
class DownloadReportRoute extends _i25.PageRouteInfo<void> {
|
||||
const DownloadReportRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(DownloadReportRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'DownloadReportRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i4.DownloadReportPage();
|
||||
@@ -126,16 +128,16 @@ class DownloadReportRoute extends _i24.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.ErrorPage]
|
||||
class ErrorRoute extends _i24.PageRouteInfo<ErrorRouteArgs> {
|
||||
class ErrorRoute extends _i25.PageRouteInfo<ErrorRouteArgs> {
|
||||
ErrorRoute({
|
||||
_i25.Key? key,
|
||||
_i26.Key? key,
|
||||
String? title,
|
||||
String? message,
|
||||
_i25.VoidCallback? onRetry,
|
||||
_i25.VoidCallback? onBack,
|
||||
_i26.VoidCallback? onRetry,
|
||||
_i26.VoidCallback? onBack,
|
||||
String? errorCode,
|
||||
_i25.IconData? errorIcon,
|
||||
List<_i24.PageRouteInfo>? children,
|
||||
_i26.IconData? errorIcon,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ErrorRoute.name,
|
||||
args: ErrorRouteArgs(
|
||||
@@ -152,7 +154,7 @@ class ErrorRoute extends _i24.PageRouteInfo<ErrorRouteArgs> {
|
||||
|
||||
static const String name = 'ErrorRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ErrorRouteArgs>(
|
||||
@@ -182,19 +184,19 @@ class ErrorRouteArgs {
|
||||
this.errorIcon,
|
||||
});
|
||||
|
||||
final _i25.Key? key;
|
||||
final _i26.Key? key;
|
||||
|
||||
final String? title;
|
||||
|
||||
final String? message;
|
||||
|
||||
final _i25.VoidCallback? onRetry;
|
||||
final _i26.VoidCallback? onRetry;
|
||||
|
||||
final _i25.VoidCallback? onBack;
|
||||
final _i26.VoidCallback? onBack;
|
||||
|
||||
final String? errorCode;
|
||||
|
||||
final _i25.IconData? errorIcon;
|
||||
final _i26.IconData? errorIcon;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -204,61 +206,61 @@ class ErrorRouteArgs {
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.FinancePage]
|
||||
class FinanceRoute extends _i24.PageRouteInfo<void> {
|
||||
const FinanceRoute({List<_i24.PageRouteInfo>? children})
|
||||
class FinanceRoute extends _i25.PageRouteInfo<void> {
|
||||
const FinanceRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(FinanceRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'FinanceRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i6.FinancePage());
|
||||
return _i25.WrappedRoute(child: const _i6.FinancePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.HomePage]
|
||||
class HomeRoute extends _i24.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i24.PageRouteInfo>? children})
|
||||
class HomeRoute extends _i25.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(HomeRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i7.HomePage());
|
||||
return _i25.WrappedRoute(child: const _i7.HomePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.InventoryPage]
|
||||
class InventoryRoute extends _i24.PageRouteInfo<void> {
|
||||
const InventoryRoute({List<_i24.PageRouteInfo>? children})
|
||||
class InventoryRoute extends _i25.PageRouteInfo<void> {
|
||||
const InventoryRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(InventoryRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'InventoryRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i8.InventoryPage());
|
||||
return _i25.WrappedRoute(child: const _i8.InventoryPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.LanguagePage]
|
||||
class LanguageRoute extends _i24.PageRouteInfo<void> {
|
||||
const LanguageRoute({List<_i24.PageRouteInfo>? children})
|
||||
class LanguageRoute extends _i25.PageRouteInfo<void> {
|
||||
const LanguageRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(LanguageRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LanguageRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i9.LanguagePage();
|
||||
@@ -268,29 +270,29 @@ class LanguageRoute extends _i24.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.LoginPage]
|
||||
class LoginRoute extends _i24.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i24.PageRouteInfo>? children})
|
||||
class LoginRoute extends _i25.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(LoginRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LoginRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i10.LoginPage());
|
||||
return _i25.WrappedRoute(child: const _i10.LoginPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.MainPage]
|
||||
class MainRoute extends _i24.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i24.PageRouteInfo>? children})
|
||||
class MainRoute extends _i25.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(MainRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MainRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i11.MainPage();
|
||||
@@ -300,11 +302,11 @@ class MainRoute extends _i24.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.OrderDetailPage]
|
||||
class OrderDetailRoute extends _i24.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
class OrderDetailRoute extends _i25.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
OrderDetailRoute({
|
||||
_i25.Key? key,
|
||||
required _i26.Order order,
|
||||
List<_i24.PageRouteInfo>? children,
|
||||
_i26.Key? key,
|
||||
required _i27.Order order,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
OrderDetailRoute.name,
|
||||
args: OrderDetailRouteArgs(key: key, order: order),
|
||||
@@ -313,7 +315,7 @@ class OrderDetailRoute extends _i24.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
|
||||
static const String name = 'OrderDetailRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<OrderDetailRouteArgs>();
|
||||
@@ -325,9 +327,9 @@ class OrderDetailRoute extends _i24.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
class OrderDetailRouteArgs {
|
||||
const OrderDetailRouteArgs({this.key, required this.order});
|
||||
|
||||
final _i25.Key? key;
|
||||
final _i26.Key? key;
|
||||
|
||||
final _i26.Order order;
|
||||
final _i27.Order order;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -337,75 +339,91 @@ class OrderDetailRouteArgs {
|
||||
|
||||
/// generated route for
|
||||
/// [_i13.OrderPage]
|
||||
class OrderRoute extends _i24.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i24.PageRouteInfo>? children})
|
||||
class OrderRoute extends _i25.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(OrderRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OrderRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i13.OrderPage());
|
||||
return _i25.WrappedRoute(child: const _i13.OrderPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i14.OutletInformationPage]
|
||||
class OutletInformationRoute extends _i24.PageRouteInfo<void> {
|
||||
const OutletInformationRoute({List<_i24.PageRouteInfo>? children})
|
||||
class OutletInformationRoute extends _i25.PageRouteInfo<void> {
|
||||
const OutletInformationRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(OutletInformationRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OutletInformationRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i14.OutletInformationPage());
|
||||
return _i25.WrappedRoute(child: const _i14.OutletInformationPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i15.ProductAnalyticPage]
|
||||
class ProductAnalyticRoute extends _i24.PageRouteInfo<void> {
|
||||
const ProductAnalyticRoute({List<_i24.PageRouteInfo>? children})
|
||||
class ProductAnalyticRoute extends _i25.PageRouteInfo<void> {
|
||||
const ProductAnalyticRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(ProductAnalyticRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProductAnalyticRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i15.ProductAnalyticPage());
|
||||
return _i25.WrappedRoute(child: const _i15.ProductAnalyticPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i16.ProductPage]
|
||||
class ProductRoute extends _i24.PageRouteInfo<void> {
|
||||
const ProductRoute({List<_i24.PageRouteInfo>? children})
|
||||
class ProductRoute extends _i25.PageRouteInfo<void> {
|
||||
const ProductRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(ProductRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProductRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i16.ProductPage());
|
||||
return _i25.WrappedRoute(child: const _i16.ProductPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i17.ProfileEditPage]
|
||||
class ProfileEditRoute extends _i24.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
/// [_i17.ProfileChangePasswordPage]
|
||||
class ProfileChangePasswordRoute extends _i25.PageRouteInfo<void> {
|
||||
const ProfileChangePasswordRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(ProfileChangePasswordRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProfileChangePasswordRoute';
|
||||
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i25.WrappedRoute(child: const _i17.ProfileChangePasswordPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i18.ProfileEditPage]
|
||||
class ProfileEditRoute extends _i25.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
ProfileEditRoute({
|
||||
_i25.Key? key,
|
||||
required _i27.User user,
|
||||
List<_i24.PageRouteInfo>? children,
|
||||
_i26.Key? key,
|
||||
required _i28.User user,
|
||||
List<_i25.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ProfileEditRoute.name,
|
||||
args: ProfileEditRouteArgs(key: key, user: user),
|
||||
@@ -414,11 +432,13 @@ class ProfileEditRoute extends _i24.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
|
||||
static const String name = 'ProfileEditRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ProfileEditRouteArgs>();
|
||||
return _i17.ProfileEditPage(key: args.key, user: args.user);
|
||||
return _i25.WrappedRoute(
|
||||
child: _i18.ProfileEditPage(key: args.key, user: args.user),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -426,9 +446,9 @@ class ProfileEditRoute extends _i24.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
class ProfileEditRouteArgs {
|
||||
const ProfileEditRouteArgs({this.key, required this.user});
|
||||
|
||||
final _i25.Key? key;
|
||||
final _i26.Key? key;
|
||||
|
||||
final _i27.User user;
|
||||
final _i28.User user;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -437,97 +457,97 @@ class ProfileEditRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i18.ProfilePage]
|
||||
class ProfileRoute extends _i24.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i24.PageRouteInfo>? children})
|
||||
/// [_i19.ProfilePage]
|
||||
class ProfileRoute extends _i25.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(ProfileRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProfileRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i18.ProfilePage());
|
||||
return _i25.WrappedRoute(child: const _i19.ProfilePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i19.PurchasePage]
|
||||
class PurchaseRoute extends _i24.PageRouteInfo<void> {
|
||||
const PurchaseRoute({List<_i24.PageRouteInfo>? children})
|
||||
/// [_i20.PurchasePage]
|
||||
class PurchaseRoute extends _i25.PageRouteInfo<void> {
|
||||
const PurchaseRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(PurchaseRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'PurchaseRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i19.PurchasePage();
|
||||
return const _i20.PurchasePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i20.ReportPage]
|
||||
class ReportRoute extends _i24.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i24.PageRouteInfo>? children})
|
||||
/// [_i21.ReportPage]
|
||||
class ReportRoute extends _i25.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(ReportRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ReportRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i20.ReportPage());
|
||||
return _i25.WrappedRoute(child: const _i21.ReportPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i21.SalesPage]
|
||||
class SalesRoute extends _i24.PageRouteInfo<void> {
|
||||
const SalesRoute({List<_i24.PageRouteInfo>? children})
|
||||
/// [_i22.SalesPage]
|
||||
class SalesRoute extends _i25.PageRouteInfo<void> {
|
||||
const SalesRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(SalesRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SalesRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i24.WrappedRoute(child: const _i21.SalesPage());
|
||||
return _i25.WrappedRoute(child: const _i22.SalesPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i22.SchedulePage]
|
||||
class ScheduleRoute extends _i24.PageRouteInfo<void> {
|
||||
const ScheduleRoute({List<_i24.PageRouteInfo>? children})
|
||||
/// [_i23.SchedulePage]
|
||||
class ScheduleRoute extends _i25.PageRouteInfo<void> {
|
||||
const ScheduleRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(ScheduleRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ScheduleRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i22.SchedulePage();
|
||||
return const _i23.SchedulePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i23.SplashPage]
|
||||
class SplashRoute extends _i24.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i24.PageRouteInfo>? children})
|
||||
/// [_i24.SplashPage]
|
||||
class SplashRoute extends _i25.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i25.PageRouteInfo>? children})
|
||||
: super(SplashRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SplashRoute';
|
||||
|
||||
static _i24.PageInfo page = _i24.PageInfo(
|
||||
static _i25.PageInfo page = _i25.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i23.SplashPage();
|
||||
return const _i24.SplashPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user