@@ -1145,6 +1145,36 @@ void main() {
1145
1145
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
1146
1146
);
1147
1147
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
+
1148
1178
testWidgets ('magnifierConfiguration passes through to EditableText' , (WidgetTester tester) async {
1149
1179
final TextMagnifierConfiguration myTextMagnifierConfiguration = TextMagnifierConfiguration (
1150
1180
magnifierBuilder: (BuildContext context, MagnifierController controller, ValueNotifier <MagnifierInfo > notifier) {
@@ -1154,7 +1184,7 @@ void main() {
1154
1184
1155
1185
await tester.pumpWidget (MaterialApp (
1156
1186
home: Scaffold (
1157
- body: TextField (
1187
+ body: TextFormField (
1158
1188
magnifierConfiguration: myTextMagnifierConfiguration,
1159
1189
),
1160
1190
),
0 commit comments