input function
ElementNode
input(
{ - Object? key,
- String type = 'text',
- String? value,
- String? placeholder,
- bool disabled = false,
- String? classes,
- Map<String, String>? style,
- EventCallback? onInput,
- Map<String, Attribute>? attrs,
})
Implementation
ElementNode input({
Object? key,
String type = 'text',
String? value,
String? placeholder,
bool disabled = false,
String? classes,
Map<String, String>? style,
EventCallback? onInput,
Map<String, Attribute>? attrs,
}) {
return el(
'input',
key: key,
classes: classes,
style: style,
onClick: onInput,
attrs: {
'type': StringAttribute(type),
if (value != null) 'value': StringAttribute(value),
if (placeholder != null) 'placeholder': StringAttribute(placeholder),
if (disabled) 'disabled': BooleanAttribute(true),
...?attrs,
},
children: const [],
);
}