Option constructor
Option({})
Creates an <option> element descriptor with value and state shorthands.
Implementation
Option({
required String value,
super.text,
bool? selected,
bool? disabled,
super.className,
Map<String, String>? attrs,
super.children = const [],
}) : super(
'option',
attrs: _mergeAttrs(attrs, {
'value': value,
if (selected == true) 'selected': 'selected',
if (disabled == true) 'disabled': 'disabled',
}),
);