fix overflow for number of comments

This commit is contained in:
krawieck 2020-08-29 20:31:53 +02:00
parent 697bbf4e9c
commit 9fabb75676
1 changed files with 11 additions and 3 deletions

View File

@ -298,9 +298,17 @@ class PostWidget extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
Icon(Icons.comment), Icon(Icons.comment),
post.numberOfComments == 1 if (post.numberOfComments == 1)
? Text(' 1 comment') Text(' 1 comment')
: Text(' ${post.numberOfComments} comments'), else
Expanded(
flex: 999,
child: Text(
''' ${NumberFormat.compact().format(post.numberOfComments)} comments''',
overflow: TextOverflow.fade,
softWrap: false,
),
),
Spacer(), Spacer(),
IconButton( IconButton(
icon: Icon(Icons.share), icon: Icon(Icons.share),