fix add order item
This commit is contained in:
parent
9e4e2ebbd1
commit
6ac88b92ae
@ -70,6 +70,9 @@ class CheckoutPage extends StatelessWidget implements AutoRouteWrapper {
|
||||
(f) => AppFlushbar.showOrderFailureToast(context, f),
|
||||
(order) {
|
||||
if (context.mounted) {
|
||||
context.read<CheckoutFormBloc>().add(
|
||||
CheckoutFormEvent.orderAddedItems(order),
|
||||
);
|
||||
context.router.replace(const SuccessAddItemOrderRoute());
|
||||
}
|
||||
},
|
||||
|
||||
@ -188,10 +188,14 @@ class SuccessAddItemOrderLeftPanel extends StatelessWidget {
|
||||
Expanded(
|
||||
child: AppElevatedButton.filled(
|
||||
onPressed: () {
|
||||
print("onPressed");
|
||||
print(checkoutState.orderAdded);
|
||||
final order = checkoutState.orderAdded;
|
||||
if (order == null) return;
|
||||
context.read<PrintStruckBloc>().add(
|
||||
PrintStruckEvent.order(
|
||||
Order.fromLastOrder(
|
||||
checkoutState.orderAdded!,
|
||||
order,
|
||||
checkoutState.items,
|
||||
),
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user