Closed
Description
I tried your documentation
but when I register OnTap I loose animation effect.
this is my code:
LikeButton(
size: 30.0,
circleColor: CircleColor(
start: Color(0xffE9C349),
end: Colors.red,
),
onTap: (isLiked) async {
await gen.addMusicsToFavorite();
final Completer<bool> completer =
new Completer<bool>();
Timer(
const Duration(milliseconds: 200),
() {
completer.complete(gen.music['is_favorite']);
return completer.future;
},
);
},
bubblesColor: BubblesColor(
dotPrimaryColor: Colors.red,
dotSecondaryColor: Color(0xffE9C349),
),
isLiked: gen.music['is_favorite'],
likeBuilder: (bool isLiked) {
return isLiked
? Icon(
Icons.favorite,
color: Color(0xffE9C349),
size: 30.0,
)
: Icon(
Icons.favorite_border,
color: Colors.white,
);
},
),
in my provider class I execute addMusicsToFavorite and then the result will be gen.music['is_favorite'],
Metadata
Metadata
Assignees
Labels
No labels