getFieldByName method
Returns the first field with the supplied name or null if not found.
Implementation
DogStructureField? getFieldByName(String name) {
for (var field in fields) {
if (field.name == name) {
return field;
}
}
return null;
}