Improvements to SearchDelegate (#91982)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user