attribute method

ModelAttribute? attribute(
  1. String name
)

Finds the first model-level attribute named name.

Implementation

ModelAttribute? attribute(String name) {
  for (final attribute in attributes) {
    if (attribute.name == name) {
      return attribute;
    }
  }

  return null;
}