Flutter. Using Theme, how to change scroll offset color? Flutter. Using Theme, how to change scroll offset color? dart dart

Flutter. Using Theme, how to change scroll offset color?


You need to use accentColor property of ThemeData class

The foreground color for widgets (knobs, text, overscroll edge effect, etc).

SAMPLE CODE

class MyApp extends StatelessWidget {  @override  Widget build(BuildContext context) {    return MaterialApp(      title: 'MyApp',      theme: ThemeData(        brightness: Brightness.light,        //Change your color here        accentColor: Colors.blue,        accentColorBrightness: Brightness.light,      ),      home: MyHomePage(),    );  }}


GlowingOverscrollIndicator will do the work for you as in the following code,

GlowingOverscrollIndicator(              axisDirection: AxisDirection.down,              // the color you want to change in place of green              color: Colors.yellow,              child: Your_ListView_Widget,)