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

prepending zero #1

Closed
ench0 opened this issue Oct 15, 2021 · 2 comments
Closed

prepending zero #1

ench0 opened this issue Oct 15, 2021 · 2 comments

Comments

@ench0
Copy link

ench0 commented Oct 15, 2021

I am trying to use this widget for a simple 2-digit countdown and also for a clock. I need 2-digits shown at any time (ie 11, 10, 09, 08, 07...). I can prepend '0' for values that are <10 but I will lose the animation for that zero that's added. Any way to have this feature?

My current workaround:

AnimatedFlipCounter(
  value: time.toDouble(),
  prefix: time<10 ? '0' : '',
),
@h65wang
Copy link
Owner

h65wang commented Oct 15, 2021

Good idea. This has been added in 0.2.0 with a new property called wholeDigits. For example, wholeDigits: 4 means it will pad 48 into 0048. Please help test this new feature and let me know how it goes. Thanks!

@ench0
Copy link
Author

ench0 commented Oct 16, 2021

Thanks for the quick fix, this seems to work great so far!

@h65wang h65wang closed this as completed Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants