ReportService class

///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////

Constructors

ReportService.new()

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

createReport(String userId, String type, GeoPoint location, Map<String, dynamic> details, {int? direction, int? lane, String suggestedAlternative = 'none'}) Future<String>
//////////// //////////// Creates a new report in Firestore.
deleteExpiredReports() Future<int>
Cleans up expired reports (can be called by a Cloud Function or admin)
deleteReport(String reportId) Future<void>
Deletes a report
getReportsAlongRoute(List<GeoPoint> routePoints, double bufferDistance) Future<List<Report>>
Gets reports along a route (for a specific route corridor)
getReportsByTypeNear(String type, GeoPoint location, double radius) Future<List<Report>>
//////////// //////////// Gets reports of a specific type near location
getReportsByUser(String userId) Future<List<Report>>
Gets reports created by a specific user
getReportsNear(GeoPoint location, double radiusKm) Future<List<Report>>
//////////// //////////// Gets reports near a specific location.
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

Operators

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