OptionElement constructor

OptionElement({
  1. String data = '',
  2. String value = '',
  3. bool selected = false,
})

Implementation

OptionElement({String data = '', String value = '', bool selected = false})
    : super._(window.document, 'option') {
  if (data.isNotEmpty) {
    appendText(data);
  }
  if (value.isNotEmpty) {
    this.value = value;
  }
  if (selected) {
    this.selected = selected;
  }
}