jesusrp98 / spacex-go

Simple yet powerful, open-source SpaceX launch tracker.
https://play.google.com/store/apps/details?id=com.chechu.cherry
GNU General Public License v3.0
880 stars 252 forks source link

Fixed constant rebuild in SwiperHeader #135

Closed aumb closed 3 years ago

aumb commented 3 years ago

Resolve issue #134

The issue was that the selectQuality function was called inside the build method.

The ScrollController in home.dart has a listener which executes

setState(() => _offset = _controller.offset)

This caused the selectQuality to be called every time the user scrolls on the screen

aumb commented 3 years ago

Thank you very much for taking the time to fix this issue, it has bothered my a lot over the last few months, you fixed it right!

No problem glad i could help! 😄