Report class
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
Constructors
-
Report.new({String? id, required String type, required GeoPoint location, String? geohash, required String createdBy, required Timestamp createdAt, required Timestamp expiresAt, int direction = 0, int lane = 0, String suggestedAlternative = 'none', Map<
String, dynamic> ? details}) - //////////// ////////////
-
Report.fromMap(Map<
String, dynamic> map, String id) -
////////////
////////////
Creates a Report from a Firestore document map
factory
Properties
- createdAt → Timestamp
-
final
- createdBy → String
-
final
-
details
→ Map<
String, dynamic> -
final
- direction → int
-
final
- expiresAt → Timestamp
-
final
- geohash → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
////////////
////////////
final
- lane → int
-
final
- location → GeoPoint
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- suggestedAlternative → String
-
final
- type → String
-
final
Methods
-
copyWith(
{String? type, GeoPoint? location, String? geohash, Timestamp? expiresAt, int? direction, int? lane, String? suggestedAlternative, Map< String, dynamic> ? details}) → Report - Creates a copy of this Report with optional parameter updates
-
formattedExpiryTime(
) → String - Gets formatted expiry time
-
getDetectionType(
) → String? - For police ("popo") reports - gets detection method
-
getObjectType(
) → String? - For object reports - gets object type
-
getRadarType(
) → String? - For police ("popo") reports - gets radar type
-
getTypeSpecificDetail(
String key) → dynamic - Gets details based on report type
-
isExpired(
) → bool - //////////// //////////// Checks if the report has expired
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
timeRemaining(
) → Duration - Gets the time remaining until expiration
-
toMap(
) → Map< String, dynamic> - //////////// //////////// Converts Report to a map for Firestore
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited