value property Null safety

Map<String, Object?> value
override

The current value of the control.

Implementation

@override
Map<String, Object?> get value => Map.unmodifiable(_value!);
void value=(Map<String, Object?>? value)
override

Set the complete value for the form group.

Example

final form = FormGroup({
  'name': FormControl(),
  'email': FormControl(),
});

form.value = { 'name': 'John Doe', 'email': 'johndoe@email.com' }

print(form.value);
{ "name": "John Doe", "email": "johndoe@email.com" }

Implementation

@override
set value(Map<String, Object?>? value) {
  updateValue(value);
}