getAttributeIdsWithImportance method

List<String> getAttributeIdsWithImportance(
  1. String importanceId
)

Returns all the attributes that match an importance.

Implementation

List<String> getAttributeIdsWithImportance(final String importanceId) {
  final List<String> result = <String>[];
  if (attributeGroups == null) {
    return result;
  }
  for (final AttributeGroup attributeGroup in attributeGroups!) {
    if (attributeGroup.attributes == null) {
      continue;
    }
    for (final Attribute attribute in attributeGroup.attributes!) {
      final String attributeId = attribute.id!;
      final String foundImportanceId =
          getImportanceIdForAttributeId(attributeId);
      if (importanceId == foundImportanceId) {
        result.add(attributeId);
      }
    }
  }
  return result;
}