findAttribute method

CustomAttribute? findAttribute(
  1. String attrName
)

Returns the first attribute matching the given attribute name.

Implementation

CustomAttribute? findAttribute(String attrName) {
  final attr = customAttributes.where((element) => element.name == attrName);

  return attr.isEmpty ? null : attr.first;
}