fix overflow for number of comments
This commit is contained in:
parent
697bbf4e9c
commit
9fabb75676
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue