auto-claude: subtask-6-1 - Run flutter analyze to ensure no errors or warnings
Fixed all 39 analyzer issues: - Removed unused import (animation_system.dart in collapsible_routes_sidebar.dart) - Removed unused element (_buildActionButton in dark_mode_map.dart) - Fixed unnecessary non-null assertions on AppLocalizations.of(context) - Removed unnecessary type checks in providers.dart - Used super parameters for key in navigation_tc_dialog.dart and status_colors.dart - Replaced print statements with debugPrint in providers.dart and logging_interceptor.dart Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -57,11 +57,9 @@ final deliveryRoutesProvider = FutureProvider<List<DeliveryRoute>>((ref) async {
|
||||
query: _EmptyQuery(),
|
||||
fromJson: (json) {
|
||||
// API returns data wrapped in object with "data" field
|
||||
if (json is Map<String, dynamic>) {
|
||||
final data = json['data'];
|
||||
if (data is List<dynamic>) {
|
||||
return data.map((r) => DeliveryRoute.fromJson(r as Map<String, dynamic>)).toList();
|
||||
}
|
||||
final data = json['data'];
|
||||
if (data is List<dynamic>) {
|
||||
return data.map((r) => DeliveryRoute.fromJson(r as Map<String, dynamic>)).toList();
|
||||
}
|
||||
return [];
|
||||
},
|
||||
@@ -88,11 +86,9 @@ final deliveriesProvider = FutureProvider.family<List<Delivery>, int>((ref, rout
|
||||
query: _DeliveriesQuery(routeFragmentId: routeFragmentId),
|
||||
fromJson: (json) {
|
||||
// API returns data wrapped in object with "data" field
|
||||
if (json is Map<String, dynamic>) {
|
||||
final data = json['data'];
|
||||
if (data is List<dynamic>) {
|
||||
return data.map((d) => Delivery.fromJson(d as Map<String, dynamic>)).toList();
|
||||
}
|
||||
final data = json['data'];
|
||||
if (data is List<dynamic>) {
|
||||
return data.map((d) => Delivery.fromJson(d as Map<String, dynamic>)).toList();
|
||||
}
|
||||
return [];
|
||||
},
|
||||
@@ -100,9 +96,9 @@ final deliveriesProvider = FutureProvider.family<List<Delivery>, int>((ref, rout
|
||||
|
||||
// Log error if API call failed
|
||||
result.whenError((error) {
|
||||
print('ERROR fetching deliveries for route $routeFragmentId: ${error.message}');
|
||||
debugPrint('ERROR fetching deliveries for route $routeFragmentId: ${error.message}');
|
||||
if (error.originalException != null) {
|
||||
print('Original exception: ${error.originalException}');
|
||||
debugPrint('Original exception: ${error.originalException}');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user