From 9d5762ecfd1b7687ebd5eb2e48c9e8e4790113f3 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 18 May 2019 16:22:40 +0200 Subject: [PATCH] Improve comments appearance --- lib/ui/tiles/comment_tile.dart | 35 ++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/lib/ui/tiles/comment_tile.dart b/lib/ui/tiles/comment_tile.dart index a5770f3..ffbe849 100644 --- a/lib/ui/tiles/comment_tile.dart +++ b/lib/ui/tiles/comment_tile.dart @@ -58,6 +58,7 @@ class CommentTile extends StatelessWidget { child: comment.hasContent ? Text( comment.content, + style: TextStyle(color: Colors.black), ) : null, ), @@ -78,22 +79,28 @@ class CommentTile extends StatelessWidget { /// Build like button associated to this post Widget _buildLikeButton() { - return Align( - alignment: AlignmentDirectional.topStart, - child: FlatButton( - padding: EdgeInsets.only(left: 0.0), - onPressed: () => onUpdateLike(comment), - child: Row( + return Padding( + padding: const EdgeInsets.only(top: 4.0, bottom: 4.0), + child: Align( + alignment: AlignmentDirectional.topStart, + child: Column( children: [ - Icon( - Icons.thumb_up, - color: comment.userLike ? Colors.blue : null, - size: 15.0, + InkWell( + onTap: () => onUpdateLike(comment), + child: Row( + children: [ + Icon( + Icons.thumb_up, + color: comment.userLike ? Colors.blue : null, + size: 15.0, + ), + SizedBox( + width: 8.0, + ), + Text(_likeString), + ], + ), ), - SizedBox( - width: 8.0, - ), - Text(_likeString), ], ), ),