CommentFunctions class abstract mixin

A mixin that contains functions for comments.

The functions are used in the FirestoreService class. You can call functions from this mixin as follows:

ref.read(firestoreServiceProvider).createComment(commentSectionID, userID, text);
Implementers

Constructors

CommentFunctions()

Properties

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

Methods

createComment(String commentSectionID, CommentModel comment) Future<void>
Creates a comment with the given text and userID.
deleteComment(String commentSectionID, CommentModel comment) Future<void>
Deletes a comment with the given commentID and commentSectionID.
editComment(String commentSectionID, CommentModel comment) Future<void>
Edits a comment with the given text.
getCommentStream(String id) Stream<List<CommentModel>>
Returns a stream of comments with the given id.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseCommentData(Map<String, dynamic>? data) List<CommentModel>
Read the document data and convert it to a list of CommentModel objects.
toString() String
A string representation of this object.
inherited

Operators

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