fluttercandies / like_button

Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's heart when you like something and animation effects to increase like count.
MIT License
469 stars 96 forks source link

Bubble animation is not working #36

Closed mahmoudwiddee closed 3 years ago

mahmoudwiddee commented 4 years ago

All of the functionalists of the button are working well, but the animation shows only the circle and the icon animation, I can't see the bubbles animation at all. here is my code:

            child: LikeButton(
              animationDuration: Duration(milliseconds: 1000),
              bubblesSize: 10,
              isLiked: item.wishlisted,
              circleColor: CircleColor(
                  start: WiddeeColors.white, end: WiddeeColors.primary),
              onTap: (liked) {
                Logger().w(item.toJson());
                if (item.wishlisted) {
                  BlocProvider.of<MenuBloc>(context).add(
                      RemoveFromWishList(item: item, categoryId: categoryId));
                  return Future.value(false);
                } else {
                  BlocProvider.of<MenuBloc>(context)
                      .add(AddToWishList(item: item, categoryId: categoryId));
                  return Future.value(true);
                }
              },
              likeBuilder: (bool isLiked) {
                return Icon(
                  isLiked ? Icons.favorite : Icons.favorite_border,
                  color: WiddeeColors.primary,
                );
              },
            ),
            left: 10,
            top: 10,
          )
zmtzawqlp commented 4 years ago

please provide runnable demo