mirror of
https://github.com/mdanics/fluttergram.git
synced 2025-08-06 13:19:53 +08:00
@ -55,10 +55,8 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||||||
),
|
),
|
||||||
trailing: OutlineButton(onPressed: (){addComment(_commentController.text);}, borderSide: BorderSide.none, child: Text("Post"),),
|
trailing: OutlineButton(onPressed: (){addComment(_commentController.text);}, borderSide: BorderSide.none, child: Text("Post"),),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -88,7 +86,6 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||||||
data.documents.forEach((DocumentSnapshot doc) {
|
data.documents.forEach((DocumentSnapshot doc) {
|
||||||
comments.add(Comment.fromDocument(doc));
|
comments.add(Comment.fromDocument(doc));
|
||||||
});
|
});
|
||||||
|
|
||||||
return comments;
|
return comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +98,7 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||||||
.add({
|
.add({
|
||||||
"username": currentUserModel.username,
|
"username": currentUserModel.username,
|
||||||
"comment": comment,
|
"comment": comment,
|
||||||
"timestamp": DateTime.now(),
|
"timestamp": Timestamp.now(),
|
||||||
"avatarUrl": currentUserModel.photoUrl,
|
"avatarUrl": currentUserModel.photoUrl,
|
||||||
"userId": currentUserModel.id
|
"userId": currentUserModel.id
|
||||||
});
|
});
|
||||||
@ -117,7 +114,7 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||||||
"type": "comment",
|
"type": "comment",
|
||||||
"userProfileImg": currentUserModel.photoUrl,
|
"userProfileImg": currentUserModel.photoUrl,
|
||||||
"commentData": comment,
|
"commentData": comment,
|
||||||
"timestamp": DateTime.now(),
|
"timestamp": Timestamp.now(),
|
||||||
"postId": postId,
|
"postId": postId,
|
||||||
"mediaUrl": postMediaUrl,
|
"mediaUrl": postMediaUrl,
|
||||||
});
|
});
|
||||||
@ -129,7 +126,7 @@ class Comment extends StatelessWidget {
|
|||||||
final String userId;
|
final String userId;
|
||||||
final String avatarUrl;
|
final String avatarUrl;
|
||||||
final String comment;
|
final String comment;
|
||||||
final String timestamp;
|
final Timestamp timestamp;
|
||||||
|
|
||||||
Comment(
|
Comment(
|
||||||
{this.username,
|
{this.username,
|
||||||
|
Reference in New Issue
Block a user