-
Notifications
You must be signed in to change notification settings - Fork 202
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
Feature Request: Have the animations go in reverse instead of clockwise #55
Comments
Show us a small code to reproduce that issue.
…On Mon, May 4, 2020, 1:50 AM fenchai ***@***.***> wrote:
if percent is 0.4 then animate from 1.0 to 0.4 instead of 0.0 to 0.4.
is this possible?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFL3UDNDXJD5BL55LV4LC3RPZQTNANCNFSM4MYP55GA>
.
|
this is just a simple linear progress widget:
I think there is a boolean for animate from last percentage, this one can actually do a reverse animation, and I think I can do it by setting the percentages to 1.0 then just lower them to their actual percentage. But this seems more like a hack to me. I would just like the animation going counter clockwise instead of clockwise. Like say an HP bar, if it is at 20% I would like it go from 100% to 20% instead of 0% to 20% as it makes no sense. |
Yes you can use animateFromLastPercentage , in other case pull requests are
open
…On Mon, May 4, 2020 at 11:01 AM fenchai ***@***.***> wrote:
this is just a simple linear progress widget:
LinearPercentIndicator(
width: MediaQuery.of(context).size.width * 0.6,
animation: true,
lineHeight: 20.0,
animationDuration: 2500,
percent: _percent / 100,
center: AutoSizeText(
item.daysLeft + ' d',
style: TextStyle(
color:
Theme.of(context).colorScheme.onPrimary.withAlpha(220)),
maxLines: 1,
),
linearStrokeCap: LinearStrokeCap.roundAll,
progressColor: _percent > 50
? Colors.green
: _percent > 30
? Colors.yellow[800]
: _percent > 0 ? Colors.red : Colors.white,
I think there is a boolean for animate from last percentage, this one can
actually do a reverse animation, and I think I can do it by setting the
percentages to 1.0 then just lower them to their actual percentage. But
this seems more like a hack to me.
I would just like the animation going counter clockwise instead of
clockwise.
Like say an HP bar, if it is at 20% I would like it go from 100% to 20%
instead of 0% to 20% as it makes no sense.
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
),
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFL3UAZLOFHGDEKJ4DZAP3RP3REBANCNFSM4MYP55GA>
.
|
if percent is 0.4 then animate from 1.0 to 0.4 instead of 0.0 to 0.4.
is this possible?
The text was updated successfully, but these errors were encountered: