Skip to main content

Post class

<p>This class creates a Post model.</p>

Constructors

Post ({required String sId, String? description, DateTime? createdAt, String? imageUrl, String? videoUrl, required User? creator, OrgInfo? organization, List<LikedBy>? likedBy, List<Comments>? comments})

Post.fromJson (Map<String, dynamic> json)

Creating a new Post instance from a map structure.

Properties

commentsList<Comments>?

comments for post.
<span class="feature">read / write</span>

createdAtDateTime?

createdAt for post.
<span class="feature">read / write</span>

creatorUser?

creator for post.
<span class="feature">read / write</span>

descriptionString?

description for post.
<span class="feature">read / write</span>

hashCodeint

The hash code for this object.
<span class="feature">read-only</span><span class="feature">inherited</span>

imageUrlString?

imageUrl for post.
<span class="feature">read / write</span>

likedByList<LikedBy>?

likedBy for post.
<span class="feature">read / write</span>

organizationOrgInfo?

organization for post.
<span class="feature">read / write</span>

runtimeTypeType

A representation of the runtime type of the object.
<span class="feature">read-only</span><span class="feature">inherited</span>

sIdString

unique identifier for post.
<span class="feature">read / write</span>

videoUrlString?

videoUrl for post.
<span class="feature">read / write</span>

Methods

getPostCreatedDuration() String

this is to get duration of post.

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed.
<span class="feature">inherited</span>

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>