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

Add ability to animate change in steps. #4

Open
barapa opened this issue May 19, 2020 · 10 comments
Open

Add ability to animate change in steps. #4

barapa opened this issue May 19, 2020 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@barapa
Copy link

barapa commented May 19, 2020

No description provided.

@SandroMaglione
Copy link
Owner

Hi @barapa ,

What do you mean specifically? How would you like this feature to work? Could you give me some more details about what you had in mind?

@barapa
Copy link
Author

barapa commented May 20, 2020

For instance, entering a new step would animate the step from it's unselected size and color to it's selected size and color. Perhaps by the color changing in the directing of the step progress

@SandroMaglione
Copy link
Owner

Do you mean for instance that all the other steps should shrink while the new step is added? Like opening some space for the new step by moving/animating the others? Would you like to be able to use a custom Animation to customize the result?

@naamapps
Copy link

Hey @SandroMaglione,
I think this is what he meant,
VideoCrop1604168677305

I would also like to have this feature,
Please consider adding it to your package.
Thanks for everything 👍

@SandroMaglione
Copy link
Owner

Hi @naamapps

I see. It is definitely possible to do it. I would like to make it as customizable as possible, using a user-defined Animation.
I will work on it. It will probably take some time. I will keep you updated.

Thanks for the suggestion 👍

@SandroMaglione SandroMaglione pinned this issue Nov 3, 2020
@SandroMaglione SandroMaglione self-assigned this Nov 3, 2020
@SandroMaglione SandroMaglione added the enhancement New feature or request label Nov 3, 2020
@desmeit
Copy link

desmeit commented Feb 23, 2022

there are some news? is it possible?

@JakeHadley
Copy link

Any updates here? Great package and would love to get this animation to work? Is it possible to do outside of the widget? Maybe with an animated container or something?

@desmeit
Copy link

desmeit commented Nov 29, 2022

Any chance to get this feature?

@hanancs
Copy link

hanancs commented Apr 30, 2023

It's not available right??

@danielRi
Copy link

danielRi commented Dec 5, 2023

I get some decent results using TweenAnimationBuilder:

TweenAnimationBuilder(
  duration: Duration(seconds: 1),
  curve: Curves.easeOutCubic,
  tween: Tween<double>(
    begin: 0.0,
    end: yourCurrentValue, // current, NOT max value
  ),
  child: const SizedBox.shrink(),
  builder: (_, value, __) {
    return StepProgressIndicator(
      totalSteps: 10000, // should be high value for smoother transitions
      currentStep: value.toInt(),
      // ...
    );
  },
);

yourCurrentValue can come from any BlocBuilder, ValueListenableBuilder or just set via setState etc.. depending on how you manage your state.

Caviats I discovered so far:

  • It will animate from 0 to current value each time your page is reloaded. Its what I want but it may be not for you.
animate.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants