diegoveloper / flutter_percent_indicator

Flutter percent indicator library
BSD 2-Clause "Simplified" License
691 stars 206 forks source link

Correcting animation update bug #5

Closed tiagosito closed 6 years ago

tiagosito commented 6 years ago

1 -Changing the widget name. Changing the name of the widget that is in the center of the component to be more intuitive and standardize with the LinearPercentIndicator component.

2 - When the LinearPercentIndicator is first created, it was defined in

initState () {
.
.
.
_animation = new Tween (begin: 0.0, end: widget.percent)
}

this forced the value of the end to never be updated without recreating everything again.

I modified it so that the final value was the maximum acceptable "1.0", so when the component receives new data it behaves correctly.

To test this, just have a list of LinearPercentIndicator and pass a value of 0.0 to it and then update the values of the list, you will see that the value drawn in the progressColor will always be the same.

3 - When the value is 0 it still paints a starting point, I modified it to be transparent when the value is equal to 0.0 para ficar igual ao CircularPercentIndicator

diegoveloper commented 6 years ago

Could you update the PR without changing the name from center to textValue? Thanks!!

tiagosito commented 6 years ago

Ok, done!

diegoveloper commented 6 years ago

That's weird I can't test the changes using your git repo and commit ref, could you move your changes to your master branch ?

tiagosito commented 6 years ago

@diegoveloper I've merged the changes in my master branch

diegoveloper commented 6 years ago

great ! thanks!!