display comment liked count
This commit is contained in:
parent
ac601c3d79
commit
cf14565825
|
@ -74,8 +74,11 @@ class ComicCommentItem extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
"Lv. ${comment.user.level} (${comment.user.title})",
|
"Lv. ${comment.user.level} (${comment.user.title})",
|
||||||
style: levelStyle),
|
style: levelStyle),
|
||||||
|
Text.rich(TextSpan(
|
||||||
|
style: levelStyle,
|
||||||
|
children: [
|
||||||
comment.commentsCount > 0
|
comment.commentsCount > 0
|
||||||
? Text.rich(TextSpan(children: [
|
? TextSpan(children: [
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: Icon(Icons.message,
|
child: Icon(Icons.message,
|
||||||
|
@ -86,9 +89,28 @@ class ComicCommentItem extends StatelessWidget {
|
||||||
WidgetSpan(child: Container(width: 5)),
|
WidgetSpan(child: Container(width: 5)),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '${comment.commentsCount}',
|
text: '${comment.commentsCount}',
|
||||||
style: levelStyle),
|
),
|
||||||
]))
|
])
|
||||||
: Container(),
|
: TextSpan(),
|
||||||
|
WidgetSpan(child: Container(width: 12)),
|
||||||
|
TextSpan(children: [
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
comment.isLiked
|
||||||
|
? Icons.favorite
|
||||||
|
: Icons.favorite_border,
|
||||||
|
size: 13,
|
||||||
|
color: theme.colorScheme.secondary
|
||||||
|
.withOpacity(.7)),
|
||||||
|
),
|
||||||
|
WidgetSpan(child: Container(width: 5)),
|
||||||
|
TextSpan(
|
||||||
|
text: '${comment.likesCount}',
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue