feat : Widget commentaire

This commit is contained in:
Yaël Perret
2026-05-14 17:23:14 +02:00
parent a812a70b1d
commit 21e798b134
7 changed files with 246 additions and 33 deletions

23
lib/models/comment.dart Normal file
View File

@@ -0,0 +1,23 @@
import 'package:json_annotation/json_annotation.dart';
part 'comment.g.dart';
@JsonSerializable()
class Comment {
final String id;
final String postId;
final String content;
final String authorName;
final String authorImageUrl;
Comment({
required this.id,
required this.postId,
required this.content,
required this.authorName,
required this.authorImageUrl,
});
factory Comment.fromJson(Map<String, dynamic> json) => _$CommentFromJson(json);
Map<String, dynamic> toJson() => _$CommentToJson(this);
}