Unverified Commit 99769b0f authored by Prateek Sunal's avatar Prateek Sunal Committed by GitHub

Improvements to SearchDelegate (#91982)

parent 6ce794e0
......@@ -581,7 +581,7 @@ class _SearchPageState<T> extends State<_SearchPage<T>> {
title: TextField(
controller: widget.delegate._queryTextController,
focusNode: focusNode,
style: theme.textTheme.headline6,
style: widget.delegate.searchFieldStyle ?? theme.textTheme.headline6,
textInputAction: widget.delegate.textInputAction,
keyboardType: widget.delegate.keyboardType,
onSubmitted: (String _) {
......
......@@ -554,8 +554,13 @@ void main() {
await tester.pumpAndSettle();
final Text hintText = tester.widget(find.text(searchHintText));
final TextField textField = tester.widget<TextField>(find.byType(TextField));
expect(hintText.style?.color, delegate.searchFieldStyle?.color);
expect(hintText.style?.fontSize, delegate.searchFieldStyle?.fontSize);
expect(textField.style?.color, delegate.searchFieldStyle?.color);
expect(textField.style?.fontSize, delegate.searchFieldStyle?.fontSize);
});
testWidgets('keyboard show search button by default', (WidgetTester tester) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment