Closed carrasc0 closed 2 years ago
You can use Globalkey to get LikeButtonState. And then use it to call onTap.
Like this:
GlobalKey<LikeButtonState> key = GlobalKey<LikeButtonState>();
LikeButton(key: key,
etc...);
key.currentState?.onTap();
Actually,I don't like to use Globalkey to do this. But I really have no way to solve this problem except edit the source code.
You can use Globalkey to get LikeButtonState. And then use it to call onTap.
Like this:
GlobalKey<LikeButtonState> key = GlobalKey<LikeButtonState>(); LikeButton(key: key, etc...); key.currentState?.onTap();
Actually,I don't like to use Globalkey to do this. But I really have no way to solve this problem except edit the source code.
pr is welcome, if you have any better way to do this , thanks
I would like to trigger the like event, like for example, double tapping my post like Instagram. As far as i saw, i didnt manage to make it, is there any way that I am missing out??
Thanks in advance