step-progress-indicator icon indicating copy to clipboard operation
step-progress-indicator copied to clipboard

Add ability to animate change in steps.

Open barapa opened this issue 5 years ago • 10 comments
trafficstars

barapa avatar May 19 '20 12:05 barapa

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?

SandroMaglione avatar May 20 '20 05:05 SandroMaglione

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

barapa avatar May 20 '20 09:05 barapa

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?

SandroMaglione avatar May 20 '20 17:05 SandroMaglione

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 👍

naamapps avatar Oct 31 '20 18:10 naamapps

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 avatar Nov 03 '20 18:11 SandroMaglione

there are some news? is it possible?

desmeit avatar Feb 23 '22 13:02 desmeit

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?

JakeHadley avatar Aug 13 '22 05:08 JakeHadley

Any chance to get this feature?

desmeit avatar Nov 29 '22 12:11 desmeit

It's not available right??

hanancs avatar Apr 30 '23 01:04 hanancs

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.

https://github.com/SandroMaglione/step-progress-indicator/assets/3048681/a05c8b22-3d5d-45dd-b1bb-92cb134377e0

danielRi avatar Dec 05 '23 15:12 danielRi