Comment class
Immutable representation of a comment returned by the API.
- Annotations
Constructors
-
Comment({required String id, required String threadId, required String body, required String authorId, String? authorName, String? authorAvatarUrl, String? parentId, required DateTime createdAt, required DateTime updatedAt, String? status, bool isDeleted = false, bool isFlagged = false, Map<
String, dynamic> metadata = const <String, dynamic>{}}) -
Builds a new Comment instance.
const
-
Comment.fromJson(Map<
String, dynamic> json) -
Constructs a Comment from a JSON object returned by the API.
factory
Properties
-
Optional avatar URL associated with the author.
final
-
Identifier of the external user who authored the comment.
final
-
Optional display name of the author when provided.
final
- body → String
-
Raw text body of the comment.
final
- createdAt → DateTime
-
Timestamp when the comment was created.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier of the comment.
final
- isDeleted → bool
-
Indicates whether the comment has been deleted server-side.
final
- isFlagged → bool
-
Indicates whether the comment has been flagged by reports or automation.
final
-
metadata
→ Map<
String, dynamic> -
Arbitrary key/value metadata associated with the comment.
final
- parentId → String?
-
Identifier of the parent comment when this entry is a reply.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → String?
-
Moderation status returned by the backend (for example
pending,approved, orrejected).final - threadId → String
-
Identifier of the thread that contains this comment.
final
- updatedAt → DateTime
-
Timestamp when the comment was last updated.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited