-
Notifications
You must be signed in to change notification settings - Fork 86
Migration Guide
Joan Pablo edited this page Jul 22, 2020
·
15 revisions
Events renamed:
-
In AbstractControl
- onValueChanged to valueChanges
- onStatusChanged to statusChanges
- onTouched to touchChanges
-
In FormGroup and FormArray
- onCollectionChanged to collectionChanges
-
In FormControl
- onFocusChanged to focusChanges
All events are now Streams so the following code:
final control = FormControl<String>();
control.onValueChanged.addListener((){
print(control.value);
});
converts to:
final control = FormControl<String>();
control.valueChanges.listen((String value){
print(value);
});