Skip to main content

PostService class

PostService class provides functions in the context of a Post.

Services include:

  • getPosts : to get all posts of the organization.
  • addLike : to add like to the post.
  • removeLike : to remove the like from the post.

Constructors

PostService ()

Properties

hashCodeint

The hash code for this object.
read-onlyinherited

postStreamStream<List<Post>>

read-only

runtimeTypeType

A representation of the runtime type of the object.
read-onlyinherited

updatedPostStreamStream<Post>

read-only

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 _currentOrg.

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed.
inherited

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.
inherited

Operators

operator ==(Object other) bool

The equality operator.
inherited