flutter_badges icon indicating copy to clipboard operation
flutter_badges copied to clipboard

Feature request - animation for badge appearing/disappearing.

Open Justus-M opened this issue 3 years ago • 6 comments

Justus-M avatar Feb 20 '22 09:02 Justus-M

Hey @Justus-M. Could you please provide the example of not getting the appearing/disappearing animation? The reason I'm asking is that we have this animation.

yadaniyil avatar May 31 '22 12:05 yadaniyil

@yadaniyil There is a fade animation for this, so my request was not clear, sorry.

What I meant was modifiable animation for badge appearing/disappearing.

When the badgecontent changes, there is an animation which can be modified (fade, scale, slide), whereas this does not seem to be applied to the animation of the badge appearing or disappearing, which is only the fade animation.

Why do I think this is useful? Because the fade animation is too subtle and does not catch the users attention, unlike the other animation types (ex. slide).

Justus-M avatar May 31 '22 15:05 Justus-M

Hey @Justus-M. Badge have a parameter animationType to which you can pass BadgeAnimationType[.scale, .fade, .slide]. You can also adjust the duration of the animation with the parameter animationDuration. Isn't that what you're talking about?

M-ixai-L avatar Jun 03 '22 18:06 M-ixai-L

Hey @Justus-M. Badge have a parameter animationType to which you can pass BadgeAnimationType[.scale, .fade, .slide]. You can also adjust the duration of the animation with the parameter animationDuration. Isn't that what you're talking about?

That animation only works when you change the badge content, not when the badge appears or disappears. In that case it only shows the fade animation.

Justus-M avatar Jun 03 '22 18:06 Justus-M

That animation only works when you change the badge content, not when the badge appears or disappears. In that case it only shows the fade animation.

Now I understand you, all right, we'll think about your offer. Thank you!

M-ixai-L avatar Jun 03 '22 19:06 M-ixai-L

@Justus-M I've faced the same lack of animation customization.

You could change the duration parameter here of AnimatedOpacity on line 207 or 224, or change it to usual Opacity if you don't need this hiding animation.

alex-tifox avatar Jun 15 '22 07:06 alex-tifox

Hey @Justus-M @alex-tifox. Please check the new version of the lib here https://pub.dev/packages/badges/versions/3.0.0-beta.1 Let me know, if your issue still needs some attention in the new version or it's resolved

yadaniyil avatar Dec 25 '22 23:12 yadaniyil