toAttributes static method

List<AttributeKvEntry> toAttributes(
  1. List? attributes
)

Implementation

static List<AttributeKvEntry> toAttributes(List<dynamic>? attributes) {
  if (attributes != null && attributes.isNotEmpty) {
    return attributes.map((attr) {
      var entry = _parseValue(attr[KEY] as String, attr[VALUE]);
      return BaseAttributeKvEntry(entry, attr[LAST_UPDATE_TS] as int);
    }).toList();
  } else {
    return [];
  }
}