@@ -54,7 +54,7 @@ class _HeaderFieldState extends State<HeaderField> {
54
54
var colorScheme = widget.colorScheme ?? Theme .of (context).colorScheme;
55
55
return TypeAheadField (
56
56
key: Key (widget.keyId),
57
- hideOnEmpty: false ,
57
+ hideOnEmpty: true ,
58
58
controller: controller,
59
59
onSelected: (value) {
60
60
setState (() {
@@ -65,11 +65,15 @@ class _HeaderFieldState extends State<HeaderField> {
65
65
itemBuilder: (context, String suggestion) {
66
66
return ListTile (
67
67
dense: true ,
68
- title: Text (suggestion),
68
+ title: Text (
69
+ suggestion,
70
+ style: TextStyle (color: colorScheme.inverseSurface),
71
+ ),
69
72
);
70
73
},
71
74
suggestionsCallback: headerSuggestionCallback,
72
- decorationBuilder: suggestionBoxDecorations,
75
+ decorationBuilder: (context, child) =>
76
+ suggestionBoxDecorations (context, child, colorScheme),
73
77
constraints: const BoxConstraints (maxHeight: 400 ),
74
78
builder: (context, controller, focusNode) => TextField (
75
79
onChanged: widget.onChanged,
@@ -97,9 +101,11 @@ class _HeaderFieldState extends State<HeaderField> {
97
101
);
98
102
}
99
103
100
- Material suggestionBoxDecorations (BuildContext context, Widget child) {
104
+ Material suggestionBoxDecorations (
105
+ BuildContext context, Widget child, ColorScheme colorScheme) {
101
106
return Material (
102
107
elevation: 4 ,
108
+ color: colorScheme.surface,
103
109
shape: RoundedRectangleBorder (
104
110
side: BorderSide (color: Theme .of (context).dividerColor, width: 1.2 ),
105
111
borderRadius: const BorderRadius .vertical (bottom: Radius .circular (8 )),
0 commit comments