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
Asked
Active
Viewed 2,012 times
2

Md. Yeasin Sheikh
- 54,221
- 7
- 29
- 56

e Res
- 101
- 1
- 10
-
https://api.flutter.dev/flutter/material/ScrollbarTheme-class.html – pskink Aug 28 '22 at 11:30
2 Answers
5
Try this:
RawScrollbar(
thumbColor: Colors.red,
radius: Radius.circular(16),
thickness: 7,
child: SingleChildScrollView()
)

Sunderam Dubey
- 1
- 11
- 20
- 40

eamirho3ein
- 16,619
- 2
- 12
- 23
2
You can provide ScrollbarThemeData:thumbColor
by wrapping the SingleChildScrollView
Theme(
data: Theme.of(context).copyWith(
scrollbarTheme: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(Colors.red),
)),
child: SingleChildScrollView(

Md. Yeasin Sheikh
- 54,221
- 7
- 29
- 56