setAttribute method

  1. @override
void setAttribute(
  1. String qualifiedName,
  2. String val
)
override

Implementation

@override
void setAttribute(String qualifiedName, String val) {
  super.setAttribute(qualifiedName, val);
  switch (qualifiedName) {
    case 'width': width = attributeToProperty<int>(val); break;
    case 'height': height = attributeToProperty<int>(val); break;
    case 'size': size = attributeToProperty<int>(val); break;
    case 'value': defaultValue = attributeToProperty<String>(val); break;
    case 'accept': accept = attributeToProperty<String>(val); break;
    case 'autocomplete': autocomplete = attributeToProperty<String>(val); break;
    case 'autofocus': autofocus = attributeToProperty<bool>(val); break;
    case 'required': required = attributeToProperty<bool>(val); break;
    case 'readonly': readOnly = attributeToProperty<bool>(val); break;
    case 'pattern': pattern = attributeToProperty<String>(val); break;
    case 'step': step = attributeToProperty<String>(val); break;
    case 'name': name = attributeToProperty<String>(val); break;
    case 'multiple': multiple = attributeToProperty<bool>(val); break;
    case 'checked': checked = attributeToProperty<bool>(val); break;
    case 'disabled': disabled = attributeToProperty<bool>(val); break;
    case 'min': min = attributeToProperty<String>(val); break;
    case 'max': max = attributeToProperty<String>(val); break;
    case 'minlength': minLength = attributeToProperty<int>(val); break;
    case 'maxlength': maxLength = attributeToProperty<int>(val); break;
    case 'placeholder': placeholder = attributeToProperty<String>(val); break;
    case 'type': type = attributeToProperty<String>(val); break;
    case 'inputmode': inputMode = attributeToProperty<String>(val); break;
  }
}