fromAttributeValues static method

dynamic fromAttributeValues(
  1. List<TrackedEntityAttributeValue> attributeValues, {
  2. Map<String, DataValueObject>? initialEntities = null,
})

Implementation

static fromAttributeValues(List<TrackedEntityAttributeValue> attributeValues,
    {Map<String, DataValueObject>? initialEntities = null}) {
  Map<String, DataValueObject> entities = initialEntities ?? {};

  attributeValues.forEach((attributeValue) {
    entities[attributeValue.attribute] = DataValueObject(
        id: attributeValue.attribute, value: attributeValue.value);
  });

  return entities;
}