hyperfluid-tech / rotary_scrollbar

flutter scrollbar for wearOS devices with round screens
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

Added set state to the postframe callback #8

Closed nathanielheitsch closed 4 months ago

nathanielheitsch commented 1 year ago

Closes #7

nathanielheitsch commented 11 months ago

@gilnobrega

nathanielheitsch commented 11 months ago

@gilnobrega can we get this merged in?

gilnobrega commented 4 months ago

Thanks for the contribution, I appreciate this fixes the issue #7. However, using addPostFrameCallback feels like a workaround rather than adressing its root cause - that the scrollbar needs to be aware of the scrollable viewport dimension before rendering its components. Listening to ScrollMetricsNotifications is a more adequate way to achieve this.

A lot of the original codebase was merely a proof of concept for UI, but its implementation was hacky. PR #9 not only addresses this issue, but also makes using RoundScrollbar feel more like flutter's Scrollbar widget.