attribute method

ModelAttribute? attribute(
  1. String name
)

Finds the first enum-level attribute named name.

Implementation

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