From 79b9c312dee740ca2a3efa5e89ee8dc4531a9649 Mon Sep 17 00:00:00 2001 From: Tanish2002 Date: Mon, 26 Feb 2024 06:46:50 +0530 Subject: [PATCH] fix(headers list): scrollbar color not changing in darkmode --- lib/widgets/headerfield.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/widgets/headerfield.dart b/lib/widgets/headerfield.dart index dbe45886..be1a7171 100644 --- a/lib/widgets/headerfield.dart +++ b/lib/widgets/headerfield.dart @@ -75,6 +75,25 @@ class _HeaderFieldState extends State { decorationBuilder: (context, child) => suggestionBoxDecorations(context, child, colorScheme), constraints: const BoxConstraints(maxHeight: 400), + listBuilder: (context, children) => Theme( + data: ThemeData( + scrollbarTheme: ScrollbarThemeData( + thumbColor: MaterialStateProperty.all(colorScheme.inverseSurface), + trackColor: MaterialStateProperty.all( + colorScheme.inverseSurface.withOpacity(0.3)), + ), + ), + child: ListView.builder( + shrinkWrap: true, + itemCount: children.length, + itemBuilder: (context, index) { + return Container( + margin: const EdgeInsets.all(8), + child: children[index], + ); + }, + ), + ), builder: (context, controller, focusNode) => TextField( onChanged: widget.onChanged, controller: controller,