payment
This commit is contained in:
@@ -36,6 +36,7 @@ class _OrderLeftPanelState extends State<OrderLeftPanel> {
|
||||
child: Column(
|
||||
children: [
|
||||
OrderTitle(
|
||||
totalOrder: widget.state.totalOrder,
|
||||
startDate: widget.state.startDate,
|
||||
endDate: widget.state.endDate,
|
||||
title: widget.status == 'pending'
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../application/order/order_loader/order_loader_bloc.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../components/button/button.dart';
|
||||
import '../../../components/spaces/space.dart';
|
||||
import '../../../router/app_router.gr.dart';
|
||||
import 'order_information.dart';
|
||||
import 'order_list.dart';
|
||||
import 'order_list_payment.dart';
|
||||
@@ -100,7 +102,11 @@ class OrderRightPanel extends StatelessWidget {
|
||||
SpaceWidth(8),
|
||||
AppElevatedButton.filled(
|
||||
width: 120,
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
context.router.push(
|
||||
PaymentRoute(order: state.selectedOrder!),
|
||||
);
|
||||
},
|
||||
label: 'Bayar',
|
||||
icon: Icon(Icons.payment, color: Colors.white),
|
||||
),
|
||||
|
||||
@@ -13,6 +13,7 @@ class OrderTitle extends StatelessWidget {
|
||||
final DateTime endDate;
|
||||
final Function(String) onChanged;
|
||||
final void Function(DateTime? start, DateTime? end) onDateRangeChanged;
|
||||
final int totalOrder;
|
||||
const OrderTitle({
|
||||
super.key,
|
||||
required this.title,
|
||||
@@ -20,6 +21,7 @@ class OrderTitle extends StatelessWidget {
|
||||
required this.endDate,
|
||||
required this.onChanged,
|
||||
required this.onDateRangeChanged,
|
||||
required this.totalOrder,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -46,7 +48,7 @@ class OrderTitle extends StatelessWidget {
|
||||
style: AppStyle.md.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
'0 Pesanan',
|
||||
'$totalOrder Pesanan',
|
||||
style: AppStyle.md.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../application/payment/payment_form/payment_form_bloc.dart';
|
||||
import '../../../application/payment_method/payment_method_loader/payment_method_loader_bloc.dart';
|
||||
import '../../../common/theme/theme.dart';
|
||||
import '../../../domain/order/order.dart';
|
||||
import '../../../injection.dart';
|
||||
import '../../components/spaces/space.dart';
|
||||
import '../../components/toast/flushbar.dart';
|
||||
import 'widgets/payment_left_panel.dart';
|
||||
import 'widgets/payment_right_panel.dart';
|
||||
|
||||
@RoutePage()
|
||||
class PaymentPage extends StatelessWidget implements AutoRouteWrapper {
|
||||
final Order order;
|
||||
const PaymentPage({super.key, required this.order});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocListener<PaymentFormBloc, PaymentFormState>(
|
||||
listenWhen: (p, c) => p.failureOrPayment != c.failureOrPayment,
|
||||
listener: (context, state) {
|
||||
state.failureOrPayment.fold(
|
||||
() {},
|
||||
(either) => either.fold(
|
||||
(f) => AppFlushbar.showOrderFailureToast(context, f),
|
||||
(data) {},
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColor.background,
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColor.white,
|
||||
elevation: 0,
|
||||
title: const Text(
|
||||
'Pembayaran',
|
||||
style: TextStyle(color: AppColor.primary),
|
||||
),
|
||||
leading: IconButton(
|
||||
onPressed: () => context.router.maybePop(),
|
||||
icon: Icon(Icons.arrow_back, color: AppColor.primary),
|
||||
),
|
||||
),
|
||||
body: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final isWide = constraints.maxWidth > 800;
|
||||
|
||||
return BlocBuilder<PaymentFormBloc, PaymentFormState>(
|
||||
builder: (context, state) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: isWide
|
||||
? Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: PaymentLeftPanel(state: state),
|
||||
),
|
||||
const SizedBox(width: 24),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: PaymentRightPanel(state: state),
|
||||
),
|
||||
],
|
||||
)
|
||||
: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
PaymentLeftPanel(state: state),
|
||||
const SpaceHeight(24),
|
||||
PaymentRightPanel(state: state),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget wrappedRoute(BuildContext context) => MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider(
|
||||
create: (context) =>
|
||||
getIt<PaymentFormBloc>()..add(PaymentFormEvent.setOrder(order)),
|
||||
),
|
||||
BlocProvider(
|
||||
create: (context) =>
|
||||
getIt<PaymentMethodLoaderBloc>()
|
||||
..add(PaymentMethodLoaderEvent.fetched(isRefresh: true)),
|
||||
),
|
||||
],
|
||||
child: this,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../application/payment/payment_form/payment_form_bloc.dart';
|
||||
import '../../../../common/extension/extension.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../components/border/dashed_border.dart';
|
||||
import '../../../components/spaces/space.dart';
|
||||
|
||||
class PaymentLeftPanel extends StatelessWidget {
|
||||
final PaymentFormState state;
|
||||
const PaymentLeftPanel({super.key, required this.state});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Detail Order',
|
||||
style: AppStyle.h5.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'No. Pesanan',
|
||||
style: AppStyle.md.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
state.order.orderNumber,
|
||||
style: AppStyle.md.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
SpaceHeight(8),
|
||||
Divider(color: AppColor.border),
|
||||
SpaceHeight(8),
|
||||
Expanded(
|
||||
child: state.pendingItems.isEmpty
|
||||
? const Center(child: Text('Tidak ada item'))
|
||||
: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
itemCount: state.pendingItems.length,
|
||||
separatorBuilder: (_, __) =>
|
||||
Divider(color: AppColor.border),
|
||||
itemBuilder: (context, index) {
|
||||
final item = state.pendingItems[index];
|
||||
return ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
title: Text(
|
||||
item.productName,
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'Qty: ${item.quantity} | ${item.productVariantName}',
|
||||
style: AppStyle.sm,
|
||||
),
|
||||
trailing: Text(
|
||||
(item.totalPrice).currencyFormatRpV2,
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Divider(color: AppColor.border),
|
||||
_buildSummaryRow('Subtotal', state.order.subtotal),
|
||||
_buildSummaryRow('Pajak', state.order.taxAmount),
|
||||
_buildSummaryRow('Diskon', state.order.discountAmount),
|
||||
SpaceHeight(8),
|
||||
DashedDivider(color: AppColor.border),
|
||||
SpaceHeight(8),
|
||||
_buildSummaryRow(
|
||||
'Total',
|
||||
state.order.totalAmount,
|
||||
isTotal: true,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSummaryRow(
|
||||
String label,
|
||||
int amount, {
|
||||
bool isTotal = false,
|
||||
Color? color,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontWeight: isTotal ? FontWeight.bold : FontWeight.normal,
|
||||
fontSize: isTotal ? 18 : 14,
|
||||
color: color ?? Colors.black,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
amount.currencyFormatRpV2,
|
||||
style: TextStyle(
|
||||
fontWeight: isTotal ? FontWeight.bold : FontWeight.normal,
|
||||
fontSize: isTotal ? 18 : 14,
|
||||
color: color ?? Colors.black,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../application/payment/payment_form/payment_form_bloc.dart';
|
||||
import '../../../../application/payment_method/payment_method_loader/payment_method_loader_bloc.dart';
|
||||
import '../../../../common/extension/extension.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../components/button/button.dart';
|
||||
import '../../../components/card/payment_card.dart';
|
||||
import '../../../components/error/payment_method_error_state_widget.dart';
|
||||
import '../../../components/field/field.dart';
|
||||
import '../../../components/loader/loader_with_text.dart';
|
||||
import '../../../components/spaces/space.dart';
|
||||
import '../../../components/toast/flushbar.dart';
|
||||
|
||||
class PaymentRightPanel extends StatefulWidget {
|
||||
final PaymentFormState state;
|
||||
const PaymentRightPanel({super.key, required this.state});
|
||||
|
||||
@override
|
||||
State<PaymentRightPanel> createState() => _PaymentRightPanelState();
|
||||
}
|
||||
|
||||
class _PaymentRightPanelState extends State<PaymentRightPanel> {
|
||||
TextEditingController totalPriceController = TextEditingController();
|
||||
|
||||
int priceValue = 0;
|
||||
int pasMoney1 = 0;
|
||||
int pasMoney2 = 0;
|
||||
int pasMoney3 = 0;
|
||||
|
||||
initMoney() {
|
||||
setState(() {
|
||||
priceValue = widget.state.order.totalAmount;
|
||||
pasMoney1 = widget.state.order.totalAmount;
|
||||
pasMoney2 = pasMoney1 ~/ 50000 * 50000 + 50000;
|
||||
pasMoney3 = pasMoney1 ~/ 50000 * 50000 + 100000;
|
||||
totalPriceController.text =
|
||||
widget.state.order.totalAmount.currencyFormatRpV2;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
initMoney();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Pembayaran',
|
||||
style: AppStyle.h5.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SpaceHeight(24),
|
||||
Text(
|
||||
'Metode Pembayaran',
|
||||
style: AppStyle.md.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
SpaceHeight(12),
|
||||
BlocBuilder<
|
||||
PaymentMethodLoaderBloc,
|
||||
PaymentMethodLoaderState
|
||||
>(
|
||||
builder: (context, pmState) {
|
||||
if (pmState.isFetching) {
|
||||
return Center(child: LoaderWithText());
|
||||
}
|
||||
return pmState.failureOption.fold(
|
||||
() => Wrap(
|
||||
spacing: 12.0,
|
||||
runSpacing: 8.0,
|
||||
children: pmState.paymentMethods.map((item) {
|
||||
// Set default selected payment method if none selected or if current selection is not in the list
|
||||
if (widget.state.paymentMethod == null ||
|
||||
!pmState.paymentMethods.any(
|
||||
(method) =>
|
||||
method.id ==
|
||||
widget.state.paymentMethod?.id,
|
||||
)) {
|
||||
context.read<PaymentFormBloc>().add(
|
||||
PaymentFormEvent.setPaymentMethod(
|
||||
pmState.paymentMethods.first,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return PaymentCard(
|
||||
payment: item,
|
||||
isSelected: widget.state.paymentMethod == item,
|
||||
onSelected: (_) {
|
||||
context.read<PaymentFormBloc>().add(
|
||||
PaymentFormEvent.setPaymentMethod(item),
|
||||
);
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
(f) => PaymentMethodErrorStateWidget(failure: f),
|
||||
);
|
||||
},
|
||||
),
|
||||
SpaceHeight(24),
|
||||
if (widget.state.paymentMethod != null &&
|
||||
widget.state.paymentMethod!.type == 'cash')
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Total Bayar',
|
||||
style: AppStyle.lg.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SpaceHeight(8.0),
|
||||
AppTextFormField(
|
||||
label: 'Total Bayar',
|
||||
showLabel: false,
|
||||
keyboardType: TextInputType.number,
|
||||
controller: totalPriceController,
|
||||
onChanged: (value) {
|
||||
priceValue = value.toIntegerFromText;
|
||||
final int newValue = value.toIntegerFromText;
|
||||
totalPriceController.text =
|
||||
newValue.currencyFormatRp;
|
||||
totalPriceController.selection =
|
||||
TextSelection.fromPosition(
|
||||
TextPosition(
|
||||
offset: totalPriceController.text.length,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SpaceHeight(20.0),
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: [
|
||||
AppElevatedButton.outlined(
|
||||
width: 150.0,
|
||||
onPressed: () {
|
||||
totalPriceController.text = pasMoney1
|
||||
.toString()
|
||||
.currencyFormatRpV2;
|
||||
priceValue = pasMoney1;
|
||||
},
|
||||
label: 'UANG PAS',
|
||||
),
|
||||
const SpaceWidth(20.0),
|
||||
AppElevatedButton.outlined(
|
||||
width: 150.0,
|
||||
onPressed: () {
|
||||
totalPriceController.text = pasMoney2
|
||||
.toString()
|
||||
.currencyFormatRpV2;
|
||||
priceValue = pasMoney2;
|
||||
},
|
||||
label: pasMoney2.toString().currencyFormatRpV2,
|
||||
),
|
||||
const SpaceWidth(20.0),
|
||||
AppElevatedButton.outlined(
|
||||
width: 150.0,
|
||||
onPressed: () {
|
||||
totalPriceController.text = pasMoney3
|
||||
.toString()
|
||||
.currencyFormatRpV2;
|
||||
priceValue = pasMoney3;
|
||||
},
|
||||
label: pasMoney3.toString().currencyFormatRpV2,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
AppElevatedButton.filled(
|
||||
onPressed: () {
|
||||
if (widget.state.paymentMethod == null) {
|
||||
AppFlushbar.showError(
|
||||
context,
|
||||
'Pilih metode pembayaran terlebih dahulu',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (widget.state.paymentMethod?.type == "cash" &&
|
||||
priceValue == 0) {
|
||||
AppFlushbar.showError(context, 'Total bayar tidak boleh 0');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!widget.state.isSubmitting) {
|
||||
context.read<PaymentFormBloc>().add(
|
||||
PaymentFormEvent.submitted(),
|
||||
);
|
||||
}
|
||||
},
|
||||
label: 'Bayar',
|
||||
isLoading: widget.state.isSubmitting,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -33,5 +33,8 @@ class AppRouter extends RootStackRouter {
|
||||
AutoRoute(page: OrderRoute.page),
|
||||
AutoRoute(page: SuccessOrderRoute.page),
|
||||
AutoRoute(page: SuccessAddItemOrderRoute.page),
|
||||
|
||||
// Payment
|
||||
AutoRoute(page: PaymentRoute.page),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// coverage:ignore-file
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:apskel_pos_flutter_v2/domain/order/order.dart' as _i16;
|
||||
import 'package:apskel_pos_flutter_v2/domain/order/order.dart' as _i17;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/auth/login/login_page.dart'
|
||||
as _i4;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/checkout/checkout_page.dart'
|
||||
@@ -21,97 +21,99 @@ import 'package:apskel_pos_flutter_v2/presentation/pages/main/pages/customer/cus
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/main/pages/home/home_page.dart'
|
||||
as _i3;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/main/pages/report/report_page.dart'
|
||||
as _i7;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/main/pages/setting/setting_page.dart'
|
||||
as _i8;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/main/pages/setting/setting_page.dart'
|
||||
as _i9;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/main/pages/table/table_page.dart'
|
||||
as _i13;
|
||||
as _i14;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/order/order_page.dart'
|
||||
as _i6;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/order/pages/success_add_item_order/success_add_item_order_page.dart'
|
||||
as _i10;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/order/pages/success_order/success_order_page.dart'
|
||||
as _i11;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/splash/splash_page.dart'
|
||||
as _i9;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/sync/sync_page.dart'
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/order/pages/success_order/success_order_page.dart'
|
||||
as _i12;
|
||||
import 'package:auto_route/auto_route.dart' as _i14;
|
||||
import 'package:flutter/material.dart' as _i15;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/payment/payment_page.dart'
|
||||
as _i7;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/splash/splash_page.dart'
|
||||
as _i10;
|
||||
import 'package:apskel_pos_flutter_v2/presentation/pages/sync/sync_page.dart'
|
||||
as _i13;
|
||||
import 'package:auto_route/auto_route.dart' as _i15;
|
||||
import 'package:flutter/material.dart' as _i16;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.CheckoutPage]
|
||||
class CheckoutRoute extends _i14.PageRouteInfo<void> {
|
||||
const CheckoutRoute({List<_i14.PageRouteInfo>? children})
|
||||
class CheckoutRoute extends _i15.PageRouteInfo<void> {
|
||||
const CheckoutRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(CheckoutRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CheckoutRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i14.WrappedRoute(child: const _i1.CheckoutPage());
|
||||
return _i15.WrappedRoute(child: const _i1.CheckoutPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.CustomerPage]
|
||||
class CustomerRoute extends _i14.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i14.PageRouteInfo>? children})
|
||||
class CustomerRoute extends _i15.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(CustomerRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CustomerRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i14.WrappedRoute(child: const _i2.CustomerPage());
|
||||
return _i15.WrappedRoute(child: const _i2.CustomerPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.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 _i14.WrappedRoute(child: const _i3.HomePage());
|
||||
return _i15.WrappedRoute(child: const _i3.HomePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.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 _i14.WrappedRoute(child: const _i4.LoginPage());
|
||||
return _i15.WrappedRoute(child: const _i4.LoginPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.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 _i5.MainPage();
|
||||
@@ -121,11 +123,11 @@ class MainRoute extends _i14.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.OrderPage]
|
||||
class OrderRoute extends _i14.PageRouteInfo<OrderRouteArgs> {
|
||||
class OrderRoute extends _i15.PageRouteInfo<OrderRouteArgs> {
|
||||
OrderRoute({
|
||||
_i15.Key? key,
|
||||
_i16.Key? key,
|
||||
required String status,
|
||||
List<_i14.PageRouteInfo>? children,
|
||||
List<_i15.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
OrderRoute.name,
|
||||
args: OrderRouteArgs(key: key, status: status),
|
||||
@@ -134,11 +136,11 @@ class OrderRoute extends _i14.PageRouteInfo<OrderRouteArgs> {
|
||||
|
||||
static const String name = 'OrderRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<OrderRouteArgs>();
|
||||
return _i14.WrappedRoute(
|
||||
return _i15.WrappedRoute(
|
||||
child: _i6.OrderPage(key: args.key, status: args.status),
|
||||
);
|
||||
},
|
||||
@@ -148,7 +150,7 @@ class OrderRoute extends _i14.PageRouteInfo<OrderRouteArgs> {
|
||||
class OrderRouteArgs {
|
||||
const OrderRouteArgs({this.key, required this.status});
|
||||
|
||||
final _i15.Key? key;
|
||||
final _i16.Key? key;
|
||||
|
||||
final String status;
|
||||
|
||||
@@ -159,76 +161,115 @@ class OrderRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.ReportPage]
|
||||
class ReportRoute extends _i14.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i7.PaymentPage]
|
||||
class PaymentRoute extends _i15.PageRouteInfo<PaymentRouteArgs> {
|
||||
PaymentRoute({
|
||||
_i16.Key? key,
|
||||
required _i17.Order order,
|
||||
List<_i15.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
PaymentRoute.name,
|
||||
args: PaymentRouteArgs(key: key, order: order),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'PaymentRoute';
|
||||
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<PaymentRouteArgs>();
|
||||
return _i15.WrappedRoute(
|
||||
child: _i7.PaymentPage(key: args.key, order: args.order),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class PaymentRouteArgs {
|
||||
const PaymentRouteArgs({this.key, required this.order});
|
||||
|
||||
final _i16.Key? key;
|
||||
|
||||
final _i17.Order order;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentRouteArgs{key: $key, order: $order}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.ReportPage]
|
||||
class ReportRoute extends _i15.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(ReportRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ReportRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i7.ReportPage();
|
||||
return const _i8.ReportPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.SettingPage]
|
||||
class SettingRoute extends _i14.PageRouteInfo<void> {
|
||||
const SettingRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i9.SettingPage]
|
||||
class SettingRoute extends _i15.PageRouteInfo<void> {
|
||||
const SettingRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(SettingRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SettingRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i8.SettingPage();
|
||||
return const _i9.SettingPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.SplashPage]
|
||||
class SplashRoute extends _i14.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i10.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 _i9.SplashPage();
|
||||
return const _i10.SplashPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.SuccessAddItemOrderPage]
|
||||
class SuccessAddItemOrderRoute extends _i14.PageRouteInfo<void> {
|
||||
const SuccessAddItemOrderRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i11.SuccessAddItemOrderPage]
|
||||
class SuccessAddItemOrderRoute extends _i15.PageRouteInfo<void> {
|
||||
const SuccessAddItemOrderRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(SuccessAddItemOrderRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SuccessAddItemOrderRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i10.SuccessAddItemOrderPage();
|
||||
return const _i11.SuccessAddItemOrderPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.SuccessOrderPage]
|
||||
class SuccessOrderRoute extends _i14.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
/// [_i12.SuccessOrderPage]
|
||||
class SuccessOrderRoute extends _i15.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
SuccessOrderRoute({
|
||||
_i15.Key? key,
|
||||
required _i16.Order order,
|
||||
List<_i14.PageRouteInfo>? children,
|
||||
_i16.Key? key,
|
||||
required _i17.Order order,
|
||||
List<_i15.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
SuccessOrderRoute.name,
|
||||
args: SuccessOrderRouteArgs(key: key, order: order),
|
||||
@@ -237,12 +278,12 @@ class SuccessOrderRoute extends _i14.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
|
||||
static const String name = 'SuccessOrderRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<SuccessOrderRouteArgs>();
|
||||
return _i14.WrappedRoute(
|
||||
child: _i11.SuccessOrderPage(key: args.key, order: args.order),
|
||||
return _i15.WrappedRoute(
|
||||
child: _i12.SuccessOrderPage(key: args.key, order: args.order),
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -251,9 +292,9 @@ class SuccessOrderRoute extends _i14.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
class SuccessOrderRouteArgs {
|
||||
const SuccessOrderRouteArgs({this.key, required this.order});
|
||||
|
||||
final _i15.Key? key;
|
||||
final _i16.Key? key;
|
||||
|
||||
final _i16.Order order;
|
||||
final _i17.Order order;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -262,33 +303,33 @@ class SuccessOrderRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.SyncPage]
|
||||
class SyncRoute extends _i14.PageRouteInfo<void> {
|
||||
const SyncRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i13.SyncPage]
|
||||
class SyncRoute extends _i15.PageRouteInfo<void> {
|
||||
const SyncRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(SyncRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SyncRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i14.WrappedRoute(child: const _i12.SyncPage());
|
||||
return _i15.WrappedRoute(child: const _i13.SyncPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i13.TablePage]
|
||||
class TableRoute extends _i14.PageRouteInfo<void> {
|
||||
const TableRoute({List<_i14.PageRouteInfo>? children})
|
||||
/// [_i14.TablePage]
|
||||
class TableRoute extends _i15.PageRouteInfo<void> {
|
||||
const TableRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(TableRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'TableRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
static _i15.PageInfo page = _i15.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i14.WrappedRoute(child: const _i13.TablePage());
|
||||
return _i15.WrappedRoute(child: const _i14.TablePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user