getField method
Returns the BloomFormField registered under name.
Throws StateError if no field with name exists in this form or if it is not a BloomFormField.
Implementation
BloomFormField getField(String name) {
final field = _fields[name];
if (field == null) {
throw StateError('BloomForm: No field registered with name "$name".');
}
if (field is! BloomFormField) {
throw StateError(
'BloomForm: Field "$name" is of type ${field.runtimeType}, expected BloomFormField.');
}
return field;
}