Here is an example of how to add ScrollBar to ListView in flutter. This can be achieved through Scrollbar widget in flutter and its simple to use.
Complete Code:
import 'package:flutter/material.dart';
main(List<String> args) {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@
override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHome(),
);
}
}
class MyHome extends StatelessWidget {
@
override
Widget build(BuildContext context) {
return Scaffold(
body: Scrollbar(
thickness: 10,
child: ListView(
children: List.generate(
20,
(int i) => Card(
child: Center(
child: ListTile(
title: Text(
'This is item ' + i.toString(),
),
),
),
),
),
),
),
);
}
}
Thanks,Srikanth