Flutter : How to add scroll indicator in ListView

Question

Asked by user6274128 on October 28, 2018 (source).

Is there any way to show the scroll indicator on the ListView?

Here is my basic code :

ListView.builder(
  itemCount: 50,
  itemBuilder: (context, index) => ListTile(title: Text("Item= ${index + 1}"),),
)

Answer

Question answered by user6274128 (source).

Thanks to Günter Zöchbauer.

You can wrap your ListView in Scrollbar

Scrollbar(
    child: ListView.builder(
      itemCount: 50,
      itemBuilder: (context, index) => ListTile(title: Text("Item= ${index + 1}"),),),
)
DART FLUTTER FLUTTER-WIDGET LISTVIEW SCROLLVIEW
SHARE: