This article explains you how to use cupertino scrollbar in flutter application. You can also check out flutter cupertino widgets related articles.
To integrate iOS style scrollbar in flutter application, we need to use cupertino widget. Scrollbar display user how long view is. So user can scroll bottom to view entire UI. CupertinoScrollbar widget has many properties to customize scrollbar in mobile app. radius property is used to set radius of shape of scrollbar thumb.
radiusWhileDragging property is used to set radius of scrollbar shape when scrollbar is dragged by user. When user stops dragging scrollbar, radius value is changed to default value. thickness property is used to set thickness of scrollbar widget.
thicknessWhileDragging property is used to set thickness of scrollbar when it is dragged by user. child property is used to assign any widget as child under scrollbar widget. If we need to add multiple child widgets then we need to use row or column widget as child widget in cupertino scrollbar. key property is used to control scrollbar widget.
If we want to display scrollbar widget consistently in mobile app then we need to give value true to isAlwaysShown property of CupertinoScrollbar widget. controller property is used to handle dragging functionality of scrollbar widget. In this flutter example, we are displaying football players names in listview widget under cupertino scrollbar widget as below.