File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ void main() {
183
183
await tester.pumpAndSettle ();
184
184
textFieldKey.currentState? .reset ();
185
185
186
- expect (textFieldKey.currentState? .initialValue , null );
186
+ expect (textFieldKey.currentState? .value , null );
187
187
});
188
188
testWidgets ('Should reset to initial when call reset' , (tester) async {
189
189
const textFieldName = 'text' ;
@@ -200,7 +200,7 @@ void main() {
200
200
await tester.pumpAndSettle ();
201
201
textFieldKey.currentState? .reset ();
202
202
203
- expect (textFieldKey.currentState? .initialValue , equals (initialValue));
203
+ expect (textFieldKey.currentState? .value , equals (initialValue));
204
204
});
205
205
testWidgets (
206
206
'Should reset custom error when invalidate field and then reset' ,
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ void main() {
301
301
await tester.pumpAndSettle ();
302
302
formKey.currentState? .reset ();
303
303
304
- expect (formKey.currentState? .initialValue , {});
304
+ expect (formKey.currentState? .instantValue , {textFieldName : null });
305
305
});
306
306
testWidgets ('Should reset to initial when call reset' , (tester) async {
307
307
const textFieldName = 'text' ;
@@ -318,7 +318,7 @@ void main() {
318
318
await tester.pumpAndSettle ();
319
319
formKey.currentState? .reset ();
320
320
321
- expect (formKey.currentState? .initialValue , equals (initialValue));
321
+ expect (formKey.currentState? .instantValue , equals (initialValue));
322
322
});
323
323
testWidgets (
324
324
'Should reset custom error when invalidate field and then reset' ,
You can’t perform that action at this time.
0 commit comments