Sanjib Sinha posted: " Photo by Zoltan Tasi on Unsplash In our previous section we've seen how we can create a Scrollbar. We have also seen how we can read about other Scrolling Widgets. A Scrollbar always belongs to the Scrolling widgets category. And there are more you ma"
In our previous section we've seen how we can create a Scrollbar. We have also seen how we can read about other Scrolling Widgets. A Scrollbar always belongs to the Scrolling widgets category. And there are more you may have interest in.
At the end of this post we'll provide you a list of other Scrolling Widgets.
When we say that a Scrollbar is interactive, actually what does that mean?
Let's try to understand that concept first. Why so? Because we've seen in our previous section that a Scrollbar thumb can be dragged along the main axis of the ScrollView to change the ScrollPosition.
If we tap along the track where the Scrollbar thumb operates, it will trigger a ScrollIncrementType.page based on the relative position to the thumb. In addition, a Scrollbar, due to its interactive nature, can use the PrimaryScrollController if a controller is not set.
When we say a Scrollbar is interactive, it directly has a link to the State of the object. In fact, to be more precise, we can say that each scroll controller is stored as member variable in State objects.
Why?
Because they can be reused in each State.build. Therefore, a ScrollController actually controls a scrollable widget.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.