brand theme, allot of features, allot of bug fixes

This commit is contained in:
2025-11-26 18:39:45 -05:00
parent 2ecd1c5b4e
commit 8e6aa6ea8c
10 changed files with 129 additions and 65 deletions
+12 -1
View File
@@ -98,7 +98,18 @@ final deliveriesProvider = FutureProvider.family<List<Delivery>, int>((ref, rout
},
);
return result.whenSuccess((deliveries) => deliveries) ?? [];
// Log error if API call failed
result.whenError((error) {
print('ERROR fetching deliveries for route $routeFragmentId: ${error.message}');
if (error.originalException != null) {
print('Original exception: ${error.originalException}');
}
});
final deliveries = result.whenSuccess((deliveries) => deliveries) ?? [];
// Always append the warehouse delivery at the end
return [...deliveries, Delivery.createWarehouseDelivery()];
});
/// Provider to get all deliveries from all routes