Report class

Constructors

Report({required DatabaseReference ref, required String uid, required String? otherUserUid, required String? chatRoomId, required String? category, required String? postId, required String? commentId, required String reason, required int createdAt, required String review})
Report.fromJson(Map json, DatabaseReference ref)
factory
Report.fromValue(dynamic value, DatabaseReference ref)
This is a factory constructor that creates a Report from a value and a key
factory

Properties

accepted bool
no setter
category String?
getter/setter pair
chatRoomId String?
getter/setter pair
commentId String?
getter/setter pair
createdAt int
final
hashCode int
The hash code for this object.
no setterinherited
isChatRoom bool
no setter
isComment bool
no setter
isPost bool
no setter
isUser bool
no setter
otherUserUid String?
getter/setter pair
postId String?
getter/setter pair
reason String
getter/setter pair
ref ↔ DatabaseReference
Variables
getter/setter pair
rejected bool
no setter
review String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uid String
getter/setter pair
unviewed bool
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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

Static Properties

acceptedRef ↔ DatabaseReference
getter/setter pair
nodeName String
Paths and Refs
getter/setter pair
rejectedRef ↔ DatabaseReference
getter/setter pair
reportsRef ↔ DatabaseReference
getter/setter pair
root ↔ DatabaseReference
getter/setter pair
unviewedRef ↔ DatabaseReference
getter/setter pair

Static Methods

accept({required Report report, required String review}) Future<void>
create({String? otherUserUid, String? chatRoomId, String? category, String? postId, String? commentId, String reason = ''}) Future<void>
reject({required Report report, required String review}) Future<void>
When the admin want to rejected/accepted the report it will remove from the unviewd list and create a report in the rejected/accepted node with the review of the admin review is the message from the admin why the admin rejected/accpeted the reports.