update gen qr

This commit is contained in:
Phuoc Nguyen
2025-11-21 17:31:49 +07:00
parent 4913a4e04b
commit 06b0834822
8 changed files with 192 additions and 44 deletions

View File

@@ -126,11 +126,6 @@ class CheckoutSubmitButton extends HookConsumerWidget {
notes: notes,
).future);
// Close loading dialog
if (context.mounted) {
Navigator.of(context).pop();
}
// Extract order number from response
final orderNumber = result['orderNumber'] as String? ??
result['orderId'] as String? ??
@@ -139,6 +134,7 @@ class CheckoutSubmitButton extends HookConsumerWidget {
if (needsNegotiation) {
// Navigate to order success page with negotiation flag
if (context.mounted) {
Navigator.of(context).pop();
context.pushReplacementNamed(
RouteNames.orderSuccess,
queryParameters: {
@@ -149,7 +145,12 @@ class CheckoutSubmitButton extends HookConsumerWidget {
);
}
} else {
// Navigate to payment QR page
// Close loading dialog
if (context.mounted) {
Navigator.of(context).pop();
}
// Navigate to payment QR page (it will fetch QR code data itself)
if (context.mounted) {
context.pushReplacementNamed(
RouteNames.paymentQr,