findAttribute method
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;
}