Add likeCount param in countDecoration
Closed this issue · 4 comments
rupertbulquerin commented
Add int likeCount
param in countDecoration property for us to know the real count and for us to do some logic depending on the like count.
countDecoration: (Widget count, int likeCount) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
count,
SizedBox(width: 5),
Text(
likeCount > 1 ? "Likes" : "Like",
style: TextStyle(color: white.withOpacity(0.7), fontSize: 12),
),
],
);
},
zmtzawqlp commented
like count is ready known from your side
rupertbulquerin commented
how and where? or how to get the count value from countDecoration property?
zmtzawqlp commented
why should we must get it from countDecoration ? like count is from your data, you already know it .
rupertbulquerin commented
yeah and also im having a problem implementing provider in it.
…On Tue, May 5, 2020, 8:30 PM zmtzawqlp ***@***.***> wrote:
why should we must get it from countDecoration ? like count is from your
data, you already know it .
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI3ROWR277RR5ZKA34KPDADRQABFVANCNFSM4MZDGOMA>
.