Skip to content
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

When I run the timer, an unknown number appears and then disappears. #53

Open
synstin opened this issue Nov 19, 2023 · 12 comments
Open

Comments

@synstin
Copy link

synstin commented Nov 19, 2023

I set it up so that a 5 second timer starts when the button is clicked.
In version 1.2.1, when I click the button, an unknown number, 93, appears and then disappears.
In the 0.6.0 version, that number does not appear.

I didn't put anything in there except the duration property.

return SlideCountdown(duration: Duration(milliseconds: 5000));

[0.6.0]
https://github.com/farhanfadila1717/slide_countdown/assets/106897491/784531dd-3495-4947-ac2b-9bd88db9184d

[1.2.1 - bug]
https://github.com/farhanfadila1717/slide_countdown/assets/106897491/7d194638-adbb-476e-8362-495e3731b84d

@synstin
Copy link
Author

synstin commented Nov 21, 2023

@farhanfadila1717

Using version 1.2.2 fixed the unknown numbers, thank you.

But when the first number is sliding, the animation is not playing.
For example, if I set a timer for 5 seconds,
I get 5 -- no animation --> 4 -> 3 -> 2 -> 1

@farhanfadila1717
Copy link
Owner

@synstin checkout the lastest version, i have refacor the RawDigitItem widget.

@synstin
Copy link
Author

synstin commented Nov 22, 2023

@farhanfadila1717
Thank you so much. But, This has been fixed, but a new error occurs.

flutter: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 527 pos 7: '_ticker != null': AnimationController.animateTo() called after AnimationController.dispose()
AnimationController methods should not be used after calling dispose.
flutter: 
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      AnimationController.animateTo (package:flutter/src/animation/animation_controller.dart:527:7)
#3      _RawDigitItemState.playHalfControllerOne (package:slide_countdown/src/widgets/raw_digit_item.dart:134:26)

And slideAnimationDuration option and the curve option are gone.
Is it not possible to customize slideAnimationDuration and curve now?
The sliding speed is too slow.
I'm really sorry for the continued demand.

@farhanfadila1717
Copy link
Owner

farhanfadila1717 commented Nov 23, 2023

@synstin whoop it's seems i forgot check the widget still mounted or disposed. i've tried to fix this, checkout the latest version.

thanks for using and reporting issue in my OS, i really appreciate it 🍻

@synstin
Copy link
Author

synstin commented Nov 23, 2023

@farhanfadila1717
I'll test it again later on a new version.
The slideAnimationDuration option and the curve option are no longer configurable?

@farhanfadila1717
Copy link
Owner

farhanfadila1717 commented Nov 26, 2023

@synstin yes it's true, i decided to remove slideAnimationDuration and curve.

@synstin
Copy link
Author

synstin commented Nov 26, 2023

@farhanfadila1717 I want to customize the sliding speed and animation.
Can you please let me customize them?

@synstin
Copy link
Author

synstin commented Apr 5, 2024

@farhanfadila1717 Are there any plans to add custom animation and duration? It would be great if it was added. thank you

@farhanfadila1717
Copy link
Owner

Hi @synstin sorry for late reply, now you can custom slide animation duration. Please check out slide_countdown 2.0.1-dev+1

@synstin
Copy link
Author

synstin commented Nov 5, 2024

@farhanfadila1717 Thank you, but is it possible to change the animation curves? I was able to in the previous version.

I'm currently using it as Curves.easeOutQuad, which looks much better than the default linear effect. I can't seem to get back to the default setting.

@synstin
Copy link
Author

synstin commented Nov 15, 2024

@farhanfadila1717
Setting slideAnimationDuration has no effect.

@farhanfadila1717
Copy link
Owner

@synstin I have fixed it and published it in the latest dev version. checkout https://pub.dev/packages/slide_countdown/versions/2.0.1-dev+2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants