Comment class

Constructors

Comment({required int id, required String content, required int postId, int? parentId, List<Comment> replies = const [], int likesCount = 0, required CommunityUser user, bool? isLikedByUser, required DateTime createdAt, required DateTime updatedAt})
Comment.fromJson(Map<String, dynamic> json)
factory

Properties

content String
final
createdAt DateTime
final
hashCode int
The hash code for this object.
no setterinherited
id int
final
isLikedByUser bool?
final
likesCount int
final
parentId int?
final
postId int
final
replies List<Comment>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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<Comment>