-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glowRepeatCount variable added to repeat animation a specific number of times #39
base: master
Are you sure you want to change the base?
Conversation
@apgapg Please review |
if (mounted) { | ||
if (widget.repeat) { | ||
_controller.repeat(); | ||
if (widget.glowRepeatCount > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reasons of readability, I would write this in a single If branch
if (mounted && widget.glowRepeatCount > 0)
@@ -64,6 +64,7 @@ AvatarGlow( | |||
glowShape: BoxShape.circle, | |||
animate: _animate, | |||
curve: Curves.fastOutSlowIn, | |||
glowRepeatCount: 5 // Animation will be repeated 5 times |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would keep it the same as the other parameters. Either comment on all of them or leave out the comment
It would be very nice if you could merge the PR as I, like many others, need this feature. @apgapg |
Sure would do In few hrs |
The animation will be repeated 5 times as glowRepeatCount is set to 5. If this value is not passed then it will have existing behaviour.
Code:
Screen.Recording.2024-04-10.at.4.27.15.PM.mov
Description
Type of Change