Reputation: 155
How can I change color of scroll bar indicator in SingleChildScrollView
, the SingleChildScrollView
doesn't have option color or something for style, if we can't change color of SingleChildScrollView
do we have any alternative for that
Upvotes: 3
Views: 4465
Reputation: 17880
Try this:
RawScrollbar(
thumbColor: Colors.red,
radius: Radius.circular(16),
thickness: 7,
child: SingleChildScrollView()
)
Upvotes: 6
Reputation: 63559
You can provide ScrollbarThemeData:thumbColor
by wrapping the SingleChildScrollView
Theme(
data: Theme.of(context).copyWith(
scrollbarTheme: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(Colors.red),
)),
child: SingleChildScrollView(
Upvotes: 5