kevlatus / flutter_fortune_wheel

Visualize random selections with Flutter widgets like the wheel of fortune.
https://kevlatus.github.io/flutter_fortune_wheel
MIT License
110 stars 84 forks source link

feat: use stream to select new items #37

Closed kevlatus closed 3 years ago

kevlatus commented 3 years ago

Currently, a FortuneWidget's animation will not be triggered, when the same value is selected multiple times in a row. This is due to the implementation checking for inequality of a new value.

With this change, FortuneWidgets will be passed a Stream<int> instead of int for the selected property, which triggers the animation whenever the stream sends a new value.

Since this feature changes the public API, it will be shipped with the next major version update.

mohamad-elbohsaly commented 3 years ago

@kevlatus , kindly advise on the animation functionality It's still not working even if using Stream