Post class

Constructors

Post({required int id, required String title, required String content, String? image, bool? isPinned, bool? isApproved, int likesCount = 0, int commentsCount = 0, required CommunityUser user, required Community community, required bool isLikedByUser, required DateTime createdAt, required DateTime updatedAt})
Post.fromJson(Map<String, dynamic> json)
factory

Properties

commentsCount → int
final
community → Community
final
content → String
final
createdAt → DateTime
final
hashCode → int
The hash code for this object.
no setterinherited
id → int
final
image → String?
final
isApproved → bool?
final
isLikedByUser → bool
final
isPinned → bool?
final
likesCount → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String
final
updatedAt → DateTime
final
user → CommunityUser
final

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

Operators

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

Static Methods

listFromJson(String str) → List<Post>