add items order
This commit is contained in:
@@ -0,0 +1,284 @@
|
||||
import 'package:dropdown_search/dropdown_search.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../application/checkout/checkout_form/checkout_form_bloc.dart';
|
||||
import '../../../../application/order/order_form/order_form_bloc.dart';
|
||||
import '../../../../application/order/order_loader/order_loader_bloc.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../../domain/order/order.dart';
|
||||
import '../../button/button.dart';
|
||||
import '../../loader/loader_with_text.dart';
|
||||
import '../../spaces/space.dart';
|
||||
import '../dialog.dart';
|
||||
|
||||
class OrderAddItemDialog extends StatefulWidget {
|
||||
final CheckoutFormState checkoutState;
|
||||
const OrderAddItemDialog({super.key, required this.checkoutState});
|
||||
|
||||
@override
|
||||
State<OrderAddItemDialog> createState() => _OrderAddItemDialogState();
|
||||
}
|
||||
|
||||
class _OrderAddItemDialogState extends State<OrderAddItemDialog> {
|
||||
Order? selectedOrder;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
context.read<OrderLoaderBloc>().add(
|
||||
OrderLoaderEvent.fetched(status: 'pending', isRefresh: true),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomModalDialog(
|
||||
title: 'Tambah Pesanan',
|
||||
subtitle: 'Silahkan tambahkan pesanan ke pesanan yang sudah ada',
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0,
|
||||
vertical: 24.0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Pilih Meja yang sudah dipesan',
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
const SpaceHeight(8.0),
|
||||
BlocBuilder<OrderLoaderBloc, OrderLoaderState>(
|
||||
builder: (context, state) {
|
||||
if (state.isFetching) {
|
||||
return Center(child: LoaderWithText());
|
||||
}
|
||||
|
||||
final availableOrders = state.orders;
|
||||
|
||||
if (selectedOrder == null && availableOrders.isNotEmpty) {
|
||||
selectedOrder = availableOrders.first;
|
||||
}
|
||||
|
||||
if (availableOrders.isEmpty) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.warning.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: AppColor.warning, width: 1),
|
||||
),
|
||||
child: Text(
|
||||
'Tidak ada meja yang tersedia. Silakan pilih opsi lain.',
|
||||
style: AppStyle.md.copyWith(color: AppColor.warning),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return DropdownSearch<Order>(
|
||||
items: state.orders,
|
||||
selectedItem: selectedOrder,
|
||||
|
||||
// Dropdown properties
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
hintText: "Pilih Meja",
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.grey.shade600,
|
||||
fontSize: 14,
|
||||
),
|
||||
prefixIcon: Icon(
|
||||
Icons.category_outlined,
|
||||
color: Colors.grey.shade500,
|
||||
size: 20,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.grey.shade300,
|
||||
width: 1.5,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.grey.shade300,
|
||||
width: 1.5,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.blue.shade400,
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: Colors.white,
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Popup properties
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true,
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Cari meja...",
|
||||
prefixIcon: const Icon(Icons.search),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
menuProps: MenuProps(
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 8,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
itemBuilder: (context, order, isSelected) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? Colors.blue.shade50
|
||||
: Colors.transparent,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Colors.grey.shade100,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? Colors.blue.shade600
|
||||
: Colors.grey.shade400,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${order.tableNumber} - ${order.metadata['customer_name']}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: isSelected
|
||||
? FontWeight.w600
|
||||
: FontWeight.w500,
|
||||
color: isSelected
|
||||
? Colors.blue.shade700
|
||||
: Colors.black87,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isSelected)
|
||||
Icon(
|
||||
Icons.check,
|
||||
color: Colors.blue.shade600,
|
||||
size: 18,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
emptyBuilder: (context, searchEntry) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.search_off,
|
||||
color: Colors.grey.shade400,
|
||||
size: 48,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
searchEntry.isEmpty
|
||||
? "Tidak ada meja tersedia"
|
||||
: "Tidak ditemukan meja dengan '$searchEntry'",
|
||||
style: TextStyle(
|
||||
color: Colors.grey.shade600,
|
||||
fontSize: 14,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
// Item as string (for search functionality)
|
||||
itemAsString: (Order order) =>
|
||||
"${order.tableNumber} - ${order.metadata['customer_name']}",
|
||||
|
||||
// Comparison function
|
||||
compareFn: (Order? item1, Order? item2) {
|
||||
return item1?.id == item2?.id;
|
||||
},
|
||||
|
||||
// On changed callback
|
||||
onChanged: (Order? selectedOrder) {
|
||||
if (selectedOrder != null) {
|
||||
context.read<CheckoutFormBloc>().add(
|
||||
CheckoutFormEvent.orderAddedItems(selectedOrder),
|
||||
);
|
||||
setState(() {
|
||||
this.selectedOrder = selectedOrder;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// Validator (optional)
|
||||
validator: (Order? value) {
|
||||
if (value == null) {
|
||||
return "Meja harus dipilih";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
SpaceHeight(16),
|
||||
BlocBuilder<OrderFormBloc, OrderFormState>(
|
||||
builder: (context, state) {
|
||||
return AppElevatedButton.filled(
|
||||
isLoading: state.isAddingItemOrder,
|
||||
onPressed: state.isAddingItemOrder
|
||||
? null
|
||||
: () {
|
||||
context.read<OrderFormBloc>().add(
|
||||
OrderFormEvent.addItemOrder(
|
||||
orderId: selectedOrder?.id ?? '',
|
||||
items: widget.checkoutState.items,
|
||||
),
|
||||
);
|
||||
},
|
||||
label: 'Simpan',
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import '../../../../common/types/order_type.dart';
|
||||
import '../../../../domain/table/table.dart';
|
||||
import '../../spaces/space.dart';
|
||||
import '../dialog.dart';
|
||||
import 'order_add_item_dialog.dart';
|
||||
import 'order_pay_later_dialog.dart';
|
||||
import 'order_save_confirm_dialog.dart';
|
||||
|
||||
@@ -60,7 +61,13 @@ class OrderSaveDialog extends StatelessWidget {
|
||||
icon: Icons.shopping_cart_checkout_outlined,
|
||||
title: 'Tambahkan Pesanan',
|
||||
subtitle: 'Tambah item ke daftar pesanan',
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
OrderAddItemDialog(checkoutState: checkoutState),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -61,6 +61,22 @@ class CheckoutPage extends StatelessWidget implements AutoRouteWrapper {
|
||||
});
|
||||
},
|
||||
),
|
||||
BlocListener<OrderFormBloc, OrderFormState>(
|
||||
listenWhen: (previous, current) =>
|
||||
previous.failureOrAddItemOrder != current.failureOrAddItemOrder,
|
||||
listener: (context, state) {
|
||||
state.failureOrAddItemOrder.fold(() {}, (either) {
|
||||
either.fold(
|
||||
(f) => AppFlushbar.showOrderFailureToast(context, f),
|
||||
(order) {
|
||||
if (context.mounted) {
|
||||
context.router.replace(SuccessAddItemOrderRoute());
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
child: SafeArea(
|
||||
child: Hero(
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../../application/checkout/checkout_form/checkout_form_bloc.dart';
|
||||
import '../../../../../common/theme/theme.dart';
|
||||
import '../../../../components/spaces/space.dart';
|
||||
import 'widgets/success_add_item_order_left_panel.dart';
|
||||
import 'widgets/success_add_item_order_right_panel.dart';
|
||||
|
||||
@RoutePage()
|
||||
class SuccessAddItemOrderPage extends StatelessWidget {
|
||||
const SuccessAddItemOrderPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.background,
|
||||
body: SafeArea(
|
||||
child: BlocBuilder<CheckoutFormBloc, CheckoutFormState>(
|
||||
builder: (context, checkoutState) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 35,
|
||||
child: SuccessAddItemOrderLeftPanel(
|
||||
checkoutState: checkoutState,
|
||||
),
|
||||
),
|
||||
SpaceWidth(16),
|
||||
Expanded(
|
||||
flex: 65,
|
||||
child: SuccessAddItemOrderRightPanel(
|
||||
checkoutState: checkoutState,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
+267
@@ -0,0 +1,267 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../../../application/checkout/checkout_form/checkout_form_bloc.dart';
|
||||
import '../../../../../../common/extension/extension.dart';
|
||||
import '../../../../../../common/theme/theme.dart';
|
||||
import '../../../../../components/button/button.dart';
|
||||
import '../../../../../components/spaces/space.dart';
|
||||
import '../../../../../router/app_router.gr.dart';
|
||||
|
||||
class SuccessAddItemOrderLeftPanel extends StatelessWidget {
|
||||
final CheckoutFormState checkoutState;
|
||||
const SuccessAddItemOrderLeftPanel({super.key, required this.checkoutState});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(32.0),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppColor.primary.withOpacity(0.1),
|
||||
AppColor.primary.withOpacity(0.05),
|
||||
],
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(24),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppColor.primary,
|
||||
AppColor.primary.withOpacity(0.8),
|
||||
],
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.3),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.check_rounded,
|
||||
size: 48,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
SpaceHeight(16),
|
||||
Text(
|
||||
'Pesanan Berhasil!',
|
||||
style: AppStyle.h4.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
SpaceHeight(12),
|
||||
Text(
|
||||
'Pesanan telah diterima dan\nsedang diproses',
|
||||
style: AppStyle.md.copyWith(
|
||||
color: AppColor.primary,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Informasi Pesanan',
|
||||
style: AppStyle.lg.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SpaceHeight(24),
|
||||
_buildInfoRow(
|
||||
icon: Icons.person,
|
||||
label: 'Pemesan',
|
||||
value:
|
||||
checkoutState
|
||||
.orderAdded
|
||||
?.metadata['customer_name'] ??
|
||||
"-",
|
||||
),
|
||||
if (checkoutState.orderAdded?.payments.isNotEmpty ??
|
||||
false) ...[
|
||||
const SpaceHeight(12),
|
||||
_buildInfoRow(
|
||||
icon: Icons.wallet_outlined,
|
||||
label: 'Metode Pembayaran',
|
||||
value:
|
||||
checkoutState
|
||||
.orderAdded
|
||||
?.payments
|
||||
.first
|
||||
.paymentMethodName ??
|
||||
'-',
|
||||
),
|
||||
],
|
||||
if (checkoutState.orderAdded != null &&
|
||||
checkoutState.orderAdded?.tableNumber != "") ...[
|
||||
const SpaceHeight(12),
|
||||
_buildInfoRow(
|
||||
icon: Icons.table_restaurant_outlined,
|
||||
label: 'No. Meja',
|
||||
value: checkoutState.orderAdded?.tableNumber ?? '-',
|
||||
),
|
||||
],
|
||||
const SpaceHeight(12),
|
||||
_buildInfoRow(
|
||||
icon: Icons.access_time_rounded,
|
||||
label: 'Waktu',
|
||||
value: (DateTime.now()).toFormattedDateTime(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
_buildBottomSection(context),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBottomSection(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Colors.grey.shade50, Colors.white],
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(bottom: Radius.circular(24)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
// Action Buttons with Modern Design
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: AppElevatedButton.outlined(
|
||||
onPressed: () {
|
||||
context.read<CheckoutFormBloc>().add(
|
||||
CheckoutFormEvent.started([]),
|
||||
);
|
||||
context.router.replaceAll([const MainRoute()]);
|
||||
},
|
||||
label: "Kembali",
|
||||
),
|
||||
),
|
||||
const SpaceWidth(16),
|
||||
Expanded(
|
||||
child: AppElevatedButton.filled(
|
||||
onPressed: () {
|
||||
// onPrintRecipt(
|
||||
// context,
|
||||
// order: widget.order,
|
||||
// paymentMethod: widget.paymentMethod,
|
||||
// nominalBayar: widget.paymentMethod == "Cash"
|
||||
// ? widget.nominalBayar
|
||||
// : widget.order.totalAmount ?? 0,
|
||||
// kembalian: widget.nominalBayar -
|
||||
// (widget.order.totalAmount ?? 0),
|
||||
// productQuantity: widget.productQuantity,
|
||||
// );
|
||||
// onPrint(
|
||||
// context,
|
||||
// productQuantity: widget.productQuantity,
|
||||
// order: widget.order,
|
||||
// );
|
||||
},
|
||||
label: 'Cetak Struk',
|
||||
icon: Icon(Icons.print_rounded, color: AppColor.white),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildInfoRow({
|
||||
required IconData icon,
|
||||
required String label,
|
||||
required String value,
|
||||
Color? valueColor,
|
||||
bool showBadge = false,
|
||||
}) {
|
||||
return Row(
|
||||
children: [
|
||||
Icon(icon, size: 18, color: AppColor.primary),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
label,
|
||||
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
|
||||
),
|
||||
),
|
||||
if (showBadge && valueColor != null)
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: valueColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.check_circle, size: 14, color: valueColor),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
value,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: valueColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
else
|
||||
Text(
|
||||
value,
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: valueColor ?? AppColor.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
+371
@@ -0,0 +1,371 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../../../application/checkout/checkout_form/checkout_form_bloc.dart';
|
||||
import '../../../../../../common/extension/extension.dart';
|
||||
import '../../../../../../common/theme/theme.dart';
|
||||
import '../../../../../components/spaces/space.dart';
|
||||
|
||||
class SuccessAddItemOrderRightPanel extends StatelessWidget {
|
||||
final CheckoutFormState checkoutState;
|
||||
const SuccessAddItemOrderRightPanel({super.key, required this.checkoutState});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
_header(),
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
itemCount: checkoutState.items.length,
|
||||
separatorBuilder: (context, index) => const SizedBox(height: 12),
|
||||
itemBuilder: (context, index) {
|
||||
return _buildProductCard(index);
|
||||
},
|
||||
),
|
||||
),
|
||||
_buildSummaryFooter(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSummaryFooter() {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Colors.grey.shade50, Colors.white],
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(bottom: Radius.circular(24)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
// Decorative Divider
|
||||
Container(
|
||||
height: 1,
|
||||
margin: const EdgeInsets.only(bottom: 20),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
AppColor.primary.withOpacity(0.3),
|
||||
Colors.transparent,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Subtotal Row
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.shopping_cart_outlined,
|
||||
size: 16,
|
||||
color: AppColor.textSecondary,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Subtotal (${checkoutState.items.length} items)',
|
||||
style: AppStyle.md.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
(checkoutState.items.fold(
|
||||
0,
|
||||
(previousValue, element) =>
|
||||
previousValue +
|
||||
(element.product.price.toInt() +
|
||||
(element.variant?.priceModifier.toInt() ?? 0)) *
|
||||
element.quantity,
|
||||
)).toString().currencyFormatRpV2,
|
||||
style: AppStyle.md.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
const SpaceHeight(16),
|
||||
|
||||
// Total Payment Row with Enhanced Styling
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppColor.primary.withOpacity(0.1),
|
||||
AppColor.primary.withOpacity(0.05),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: AppColor.primary.withOpacity(0.2),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(6),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primary.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.payments_rounded,
|
||||
size: 16,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
SpaceWidth(12),
|
||||
Text(
|
||||
'Total Pembayaran',
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 6,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
AppColor.primary,
|
||||
AppColor.primary.withOpacity(0.8),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.3),
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Text(
|
||||
(checkoutState.items.fold(
|
||||
0,
|
||||
(previousValue, element) =>
|
||||
previousValue +
|
||||
(element.product.price.toInt() +
|
||||
(element.variant?.priceModifier.toInt() ??
|
||||
0)) *
|
||||
element.quantity,
|
||||
)).toString().currencyFormatRpV2,
|
||||
style: AppStyle.xl.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildProductCard(int index) {
|
||||
final item = checkoutState.items[index];
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
border: Border.all(color: AppColor.border, width: 1),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
// Enhanced Product Image
|
||||
Container(
|
||||
width: 70,
|
||||
height: 70,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primaryWithOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.restaurant_rounded,
|
||||
color: AppColor.primary,
|
||||
size: 28,
|
||||
),
|
||||
),
|
||||
|
||||
const SpaceWidth(16),
|
||||
|
||||
// Product Details
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.product.name,
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const SpaceHeight(6),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 4,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.shade100,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Text(
|
||||
item.product.price.currencyFormatRpV2,
|
||||
style: AppStyle.md.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
const SpaceWidth(16),
|
||||
|
||||
// Quantity and Total
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
AppColor.primary,
|
||||
AppColor.primary.withOpacity(0.8),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Text(
|
||||
'${item.quantity}x',
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SpaceHeight(8),
|
||||
Text(
|
||||
((item.product.price.toInt() +
|
||||
(item.variant?.priceModifier.toInt() ?? 0)) *
|
||||
item.quantity)
|
||||
.toString()
|
||||
.currencyFormatRpV2,
|
||||
style: AppStyle.lg.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Container _header() {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: AppColor.border)),
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(24)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
AppColor.primary.withOpacity(0.2),
|
||||
AppColor.primary.withOpacity(0.1),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.receipt_long_rounded,
|
||||
color: AppColor.primary,
|
||||
size: 28,
|
||||
),
|
||||
),
|
||||
SpaceWidth(16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Detail Pesanan',
|
||||
style: AppStyle.xxl.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
SpaceHeight(4),
|
||||
Text(
|
||||
'Ringkasan item yang dipesan',
|
||||
style: AppStyle.md.copyWith(color: Colors.grey.shade600),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [AppColor.primary, AppColor.primary.withOpacity(0.8)],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.3),
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Text(
|
||||
'${checkoutState.items.length} Items',
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -69,7 +69,7 @@ class SuccessOrderLeftPanel extends StatelessWidget {
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
SpaceWidth(24),
|
||||
SpaceHeight(16),
|
||||
Text(
|
||||
'Pesanan Berhasil!',
|
||||
style: AppStyle.h4.copyWith(
|
||||
@@ -77,7 +77,7 @@ class SuccessOrderLeftPanel extends StatelessWidget {
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
SpaceWidth(12),
|
||||
SpaceHeight(12),
|
||||
Text(
|
||||
'Pesanan telah diterima dan\nsedang diproses',
|
||||
style: AppStyle.md.copyWith(
|
||||
|
||||
@@ -32,5 +32,6 @@ class AppRouter extends RootStackRouter {
|
||||
// Order
|
||||
AutoRoute(page: OrderRoute.page),
|
||||
AutoRoute(page: SuccessOrderRoute.page),
|
||||
AutoRoute(page: SuccessAddItemOrderRoute.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 _i15;
|
||||
import 'package:apskel_pos_flutter_v2/domain/order/order.dart' as _i16;
|
||||
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'
|
||||
@@ -25,91 +25,93 @@ import 'package:apskel_pos_flutter_v2/presentation/pages/main/pages/report/repor
|
||||
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/table/table_page.dart'
|
||||
as _i12;
|
||||
as _i13;
|
||||
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_order/success_order_page.dart'
|
||||
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'
|
||||
as _i11;
|
||||
import 'package:auto_route/auto_route.dart' as _i13;
|
||||
import 'package:flutter/material.dart' as _i14;
|
||||
as _i12;
|
||||
import 'package:auto_route/auto_route.dart' as _i14;
|
||||
import 'package:flutter/material.dart' as _i15;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.CheckoutPage]
|
||||
class CheckoutRoute extends _i13.PageRouteInfo<void> {
|
||||
const CheckoutRoute({List<_i13.PageRouteInfo>? children})
|
||||
class CheckoutRoute extends _i14.PageRouteInfo<void> {
|
||||
const CheckoutRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(CheckoutRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CheckoutRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i13.WrappedRoute(child: const _i1.CheckoutPage());
|
||||
return _i14.WrappedRoute(child: const _i1.CheckoutPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.CustomerPage]
|
||||
class CustomerRoute extends _i13.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i13.PageRouteInfo>? children})
|
||||
class CustomerRoute extends _i14.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(CustomerRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CustomerRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i13.WrappedRoute(child: const _i2.CustomerPage());
|
||||
return _i14.WrappedRoute(child: const _i2.CustomerPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.HomePage]
|
||||
class HomeRoute extends _i13.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i13.PageRouteInfo>? children})
|
||||
class HomeRoute extends _i14.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(HomeRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i13.WrappedRoute(child: const _i3.HomePage());
|
||||
return _i14.WrappedRoute(child: const _i3.HomePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.LoginPage]
|
||||
class LoginRoute extends _i13.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i13.PageRouteInfo>? children})
|
||||
class LoginRoute extends _i14.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(LoginRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LoginRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i13.WrappedRoute(child: const _i4.LoginPage());
|
||||
return _i14.WrappedRoute(child: const _i4.LoginPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.MainPage]
|
||||
class MainRoute extends _i13.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i13.PageRouteInfo>? children})
|
||||
class MainRoute extends _i14.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(MainRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MainRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i5.MainPage();
|
||||
@@ -119,11 +121,11 @@ class MainRoute extends _i13.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.OrderPage]
|
||||
class OrderRoute extends _i13.PageRouteInfo<OrderRouteArgs> {
|
||||
class OrderRoute extends _i14.PageRouteInfo<OrderRouteArgs> {
|
||||
OrderRoute({
|
||||
_i14.Key? key,
|
||||
_i15.Key? key,
|
||||
required String status,
|
||||
List<_i13.PageRouteInfo>? children,
|
||||
List<_i14.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
OrderRoute.name,
|
||||
args: OrderRouteArgs(key: key, status: status),
|
||||
@@ -132,11 +134,11 @@ class OrderRoute extends _i13.PageRouteInfo<OrderRouteArgs> {
|
||||
|
||||
static const String name = 'OrderRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<OrderRouteArgs>();
|
||||
return _i13.WrappedRoute(
|
||||
return _i14.WrappedRoute(
|
||||
child: _i6.OrderPage(key: args.key, status: args.status),
|
||||
);
|
||||
},
|
||||
@@ -146,7 +148,7 @@ class OrderRoute extends _i13.PageRouteInfo<OrderRouteArgs> {
|
||||
class OrderRouteArgs {
|
||||
const OrderRouteArgs({this.key, required this.status});
|
||||
|
||||
final _i14.Key? key;
|
||||
final _i15.Key? key;
|
||||
|
||||
final String status;
|
||||
|
||||
@@ -158,13 +160,13 @@ class OrderRouteArgs {
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.ReportPage]
|
||||
class ReportRoute extends _i13.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i13.PageRouteInfo>? children})
|
||||
class ReportRoute extends _i14.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(ReportRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ReportRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i7.ReportPage();
|
||||
@@ -174,13 +176,13 @@ class ReportRoute extends _i13.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.SettingPage]
|
||||
class SettingRoute extends _i13.PageRouteInfo<void> {
|
||||
const SettingRoute({List<_i13.PageRouteInfo>? children})
|
||||
class SettingRoute extends _i14.PageRouteInfo<void> {
|
||||
const SettingRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(SettingRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SettingRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i8.SettingPage();
|
||||
@@ -190,13 +192,13 @@ class SettingRoute extends _i13.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.SplashPage]
|
||||
class SplashRoute extends _i13.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i13.PageRouteInfo>? children})
|
||||
class SplashRoute extends _i14.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(SplashRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SplashRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i9.SplashPage();
|
||||
@@ -205,12 +207,28 @@ class SplashRoute extends _i13.PageRouteInfo<void> {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.SuccessOrderPage]
|
||||
class SuccessOrderRoute extends _i13.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
/// [_i10.SuccessAddItemOrderPage]
|
||||
class SuccessAddItemOrderRoute extends _i14.PageRouteInfo<void> {
|
||||
const SuccessAddItemOrderRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(SuccessAddItemOrderRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SuccessAddItemOrderRoute';
|
||||
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i10.SuccessAddItemOrderPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.SuccessOrderPage]
|
||||
class SuccessOrderRoute extends _i14.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
SuccessOrderRoute({
|
||||
_i14.Key? key,
|
||||
required _i15.Order order,
|
||||
List<_i13.PageRouteInfo>? children,
|
||||
_i15.Key? key,
|
||||
required _i16.Order order,
|
||||
List<_i14.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
SuccessOrderRoute.name,
|
||||
args: SuccessOrderRouteArgs(key: key, order: order),
|
||||
@@ -219,12 +237,12 @@ class SuccessOrderRoute extends _i13.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
|
||||
static const String name = 'SuccessOrderRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<SuccessOrderRouteArgs>();
|
||||
return _i13.WrappedRoute(
|
||||
child: _i10.SuccessOrderPage(key: args.key, order: args.order),
|
||||
return _i14.WrappedRoute(
|
||||
child: _i11.SuccessOrderPage(key: args.key, order: args.order),
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -233,9 +251,9 @@ class SuccessOrderRoute extends _i13.PageRouteInfo<SuccessOrderRouteArgs> {
|
||||
class SuccessOrderRouteArgs {
|
||||
const SuccessOrderRouteArgs({this.key, required this.order});
|
||||
|
||||
final _i14.Key? key;
|
||||
final _i15.Key? key;
|
||||
|
||||
final _i15.Order order;
|
||||
final _i16.Order order;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -244,33 +262,33 @@ class SuccessOrderRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.SyncPage]
|
||||
class SyncRoute extends _i13.PageRouteInfo<void> {
|
||||
const SyncRoute({List<_i13.PageRouteInfo>? children})
|
||||
/// [_i12.SyncPage]
|
||||
class SyncRoute extends _i14.PageRouteInfo<void> {
|
||||
const SyncRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(SyncRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SyncRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i13.WrappedRoute(child: const _i11.SyncPage());
|
||||
return _i14.WrappedRoute(child: const _i12.SyncPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.TablePage]
|
||||
class TableRoute extends _i13.PageRouteInfo<void> {
|
||||
const TableRoute({List<_i13.PageRouteInfo>? children})
|
||||
/// [_i13.TablePage]
|
||||
class TableRoute extends _i14.PageRouteInfo<void> {
|
||||
const TableRoute({List<_i14.PageRouteInfo>? children})
|
||||
: super(TableRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'TableRoute';
|
||||
|
||||
static _i13.PageInfo page = _i13.PageInfo(
|
||||
static _i14.PageInfo page = _i14.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i13.WrappedRoute(child: const _i12.TablePage());
|
||||
return _i14.WrappedRoute(child: const _i13.TablePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user