HazardService class

///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// Unified service that combines Mapbox hazard data with user-reported hazards

Constructors

HazardService.new(MapboxApiService _mapboxService, ReportService _reportService, {bool combineResults = true})
//////////// ////////////

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createPopoReport(String userId, RaliPosition position, {required String detectionType, String? radarType, int? direction, int? lane}) Future<String>
Creates a "popo" (police) report
createUserReport(String userId, String type, RaliPosition position, Map<String, dynamic> details, {int? direction, int? lane, String suggestedAlternative = 'none'}) Future<String>
//////////// //////////// Creates a new user-submitted report (passes through to ReportService)
deleteReport(String reportId) Future<void>
Deletes a report (pass-through to ReportService)
getHazardsAlongRoute(RouteDetails route, double bufferDistance) Future<List<Report>>
Gets all hazards along a specified route (user reports + Mapbox data)
getHazardsNear(RaliPosition position, double radiusKm) Future<List<Report>>
//////////// //////////// Gets all hazards near a specific location (user reports + Mapbox data)
getPopoReportsNear(RaliPosition position, double radiusKm) Future<List<Report>>
Gets hazards specifically of type "popo" (police)
getReportsByUser(String userId) Future<List<Report>>
Gets reports created by a specific user
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateReport(String reportId, Map<String, dynamic> data) Future<void>
//////////// //////////// Updates an existing report (pass-through to ReportService)

Operators

operator ==(Object other) bool
The equality operator.
inherited