Unverified Commit 25443fda authored by Chinmoy's avatar Chinmoy Committed by GitHub

Sets textInputAction property of CupertinoSearchTextField to...

Sets textInputAction property of CupertinoSearchTextField to TextInputAction.search by default (#82441)
parent 254c9f17
......@@ -430,6 +430,7 @@ class _CupertinoSearchTextFieldState extends State<CupertinoSearchTextField>
onSubmitted: widget.onSubmitted,
focusNode: widget.focusNode,
autocorrect: widget.autocorrect,
textInputAction: TextInputAction.search,
);
}
}
......@@ -549,4 +549,17 @@ void main() {
final CupertinoTextField textField = tester.widget(find.byType(CupertinoTextField));
expect(textField.enabled, false);
});
testWidgets('textInputAction is set to TextInputAction.search by default', (WidgetTester tester) async {
await tester.pumpWidget(
const CupertinoApp(
home: Center(
child: CupertinoSearchTextField(),
),
),
);
final CupertinoTextField textField = tester.widget(find.byType(CupertinoTextField));
expect(textField.textInputAction, TextInputAction.search);
});
}
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