Enable Show Scrollbar Indicator in ScrollView in Flutter Android iOS

Scrollbar indicator is a vertical side bar display on ScrollView which indicates current screen position using scroll indicator. Scrollbar also shows us how much scrolling screen is renaming on mobile screen. By default Scroll is not enabled in SingleChildScrollView widget and ListView widget. But using Scrollbar() widget we can Enable Show Scrollbar Indicator in ScrollView in Flutter Android iOS App. We have to wrap SingleChildScrollView widget and ListView widget in Scrollbar() widget to enable Material style scrollbar.

Contents in this project Enable Show Scrollbar Indicator in ScrollView in Flutter Android iOS Example Tutorial:

1. Import material.dart package in your app’s main.dart file.

2. Call our main MyApp class using void main runApp() method.

3. Create our main widget class named as MyApp extends with StatelessWidget.

4. Create Scaffold widget -> SafeArea widget in Widget build area in MyApp class.

5. Create ScrollBar widget in SafeArea widget. The Scrollbar widget enables Scroll indicator in ScrollView.

6. Create SingleChildScrollView widget inside Scrollbar widget. We would create column widget in SingleChildScrollView.

7. Creating multiple Container View, Text widget and Image widget in Column widget.

8. Complete source code for main.dart file:

Screenshot:

Enable Show Scrollbar Indicator in ScrollView in Flutter Android iOS

Leave a Reply

Your email address will not be published. Required fields are marked *