Skip to content

Commit 79b9c31

Browse files
committed
fix(headers list): scrollbar color not changing in darkmode
1 parent 11515a9 commit 79b9c31

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/widgets/headerfield.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ class _HeaderFieldState extends State<HeaderField> {
7575
decorationBuilder: (context, child) =>
7676
suggestionBoxDecorations(context, child, colorScheme),
7777
constraints: const BoxConstraints(maxHeight: 400),
78+
listBuilder: (context, children) => Theme(
79+
data: ThemeData(
80+
scrollbarTheme: ScrollbarThemeData(
81+
thumbColor: MaterialStateProperty.all(colorScheme.inverseSurface),
82+
trackColor: MaterialStateProperty.all(
83+
colorScheme.inverseSurface.withOpacity(0.3)),
84+
),
85+
),
86+
child: ListView.builder(
87+
shrinkWrap: true,
88+
itemCount: children.length,
89+
itemBuilder: (context, index) {
90+
return Container(
91+
margin: const EdgeInsets.all(8),
92+
child: children[index],
93+
);
94+
},
95+
),
96+
),
7897
builder: (context, controller, focusNode) => TextField(
7998
onChanged: widget.onChanged,
8099
controller: controller,

0 commit comments

Comments
 (0)