Attribute constructor

Attribute(
  1. String name,
  2. dynamic initialValues
)

Constructor.

Creates an Attribute object and sets its name and values.

If the initialValues is an Iterable each of its values are made the values of the attribute. Otherwise, it is made the single value in the attribute.

Implementation

Attribute(String name, dynamic initialValues) : _name = name {
  if (initialValues is Iterable) {
    _values.addAll(initialValues);
  } else {
    _values.add(initialValues);
  }
}