PostService class
<p>PostService class provides functions in the context of a Post.</p> <p>Services include:</p> <ul> <li><code>getPosts</code> : to get all posts of the organization.</li> <li><code>addLike</code> : to add like to the post.</li> <li><code>removeLike</code> : to remove the like from the post.</li> </ul>
Constructors
PostService ()
Properties
hashCode → int
The hash code for this object.
<span class="feature">read-only</span><span class="feature">inherited</span>
postStream → Stream<List<Post>>
<span class="feature">read-only</span>
runtimeType → Type
A representation of the runtime type of the object.
<span class="feature">read-only</span><span class="feature">inherited</span>
updatedPostStream → Stream<Post>
<span class="feature">read-only</span>
Methods
addCommentLocally(String postID) void
addLike(String postID) Future<void>
This function is used to add Like to the Post.
getPosts() Future<void>
This function used to get all posts of an organization. The function reference the organization Id from <code>_currentOrg</code>.
noSuchMethod(Invocation invocation) dynamic
Invoked when a non-existent method or property is accessed.
<span class="feature">inherited</span>
removeLike(String postID) Future<void>
This function is used to remove like from the Post.
setOrgStreamSubscription() void
toString() String
A string representation of this object.
<span class="feature">inherited</span>
Operators
operator ==(Object other) bool
The equality operator.
<span class="feature">inherited</span>