@@ -1145,6 +1145,36 @@ void main() {
11451145 skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
11461146 );
11471147
1148+ testWidgets ('spellCheckConfiguration passes through to EditableText' , (WidgetTester tester) async {
1149+ final SpellCheckConfiguration mySpellCheckConfiguration = SpellCheckConfiguration (
1150+ spellCheckService: DefaultSpellCheckService (),
1151+ misspelledTextStyle: TextField .materialMisspelledTextStyle,
1152+ );
1153+
1154+ await tester.pumpWidget (MaterialApp (
1155+ home: Scaffold (
1156+ body: TextFormField (
1157+ spellCheckConfiguration: mySpellCheckConfiguration,
1158+ ),
1159+ ),
1160+ ));
1161+
1162+ expect (find.byType (EditableText ), findsOneWidget);
1163+
1164+ final EditableText editableText = tester.widget (find.byType (EditableText ));
1165+
1166+ // Can't do equality comparison on spellCheckConfiguration itself because it
1167+ // will have been copied.
1168+ expect (
1169+ editableText.spellCheckConfiguration? .spellCheckService,
1170+ equals (mySpellCheckConfiguration.spellCheckService),
1171+ );
1172+ expect (
1173+ editableText.spellCheckConfiguration? .misspelledTextStyle,
1174+ equals (mySpellCheckConfiguration.misspelledTextStyle),
1175+ );
1176+ });
1177+
11481178 testWidgets ('magnifierConfiguration passes through to EditableText' , (WidgetTester tester) async {
11491179 final TextMagnifierConfiguration myTextMagnifierConfiguration = TextMagnifierConfiguration (
11501180 magnifierBuilder: (BuildContext context, MagnifierController controller, ValueNotifier <MagnifierInfo > notifier) {
@@ -1154,7 +1184,7 @@ void main() {
11541184
11551185 await tester.pumpWidget (MaterialApp (
11561186 home: Scaffold (
1157- body: TextField (
1187+ body: TextFormField (
11581188 magnifierConfiguration: myTextMagnifierConfiguration,
11591189 ),
11601190 ),
0 commit comments