Resource constructor

Resource(
  1. List<Attribute> attributes, [
  2. int? droppedAttributesCount
])

Implementation

Resource(List<api.Attribute> attributes, [this.droppedAttributesCount])
    : _attributes = Attributes.empty() {
  for (final attribute in attributes) {
    if (attribute.value is! String) {
      throw ArgumentError('Attributes value must be String.');
    }
  }
  _attributes.addAll(attributes);
}