Update project

This commit is contained in:
2026-07-23 15:36:11 +05:30
parent 1197cfc161
commit 14fffa40c6
84 changed files with 20918 additions and 2761 deletions

View File

@@ -7,6 +7,7 @@ import '../../modules/orders/create_order.dart';
class OrderController extends GetxController {
final CreateOrderProvider provider = CreateOrderProvider();
var isLoading = false.obs;
String? lastError; // 👈 add this
Future<CreateOrderResponse?> createOrder(CreateOrderRequest request) async {
try {
@@ -17,20 +18,19 @@ class OrderController extends GetxController {
isLoading.value = false;
if (response.status == 'accepted') {
print(response.status);
print("✅ Order Success");
} else {
print("❌ Order Failed");
}
return response; // ✅ VERY IMPORTANT
return response;
} catch (e) {
isLoading.value = false;
print("🔥 ERROR: $e");
print("🔥 ERROR: $e"); // already printing e here
print("🔥 ERROR TYPE: ${e.runtimeType}"); // 👈 add this to see the exact class
return null; // ✅ return null on error
return null;
}
}}