Comment constructor
const
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.
Most fields are provided by the backend; metadata defaults to an empty
map if none is present in the payload.
Implementation
const Comment({
required this.id,
required this.threadId,
required this.body,
required this.authorId,
this.authorName,
this.authorAvatarUrl,
this.parentId,
required this.createdAt,
required this.updatedAt,
this.status,
this.isDeleted = false,
this.isFlagged = false,
this.metadata = const <String, dynamic>{},
});