input<T> function
Element
input<
T>({ - String? type,
- String? name,
- T? value,
- String? placeholder,
- String? id,
- String? className,
- Map<String, dynamic>? attributes,
- FutureOr<void> onInput(
- T
)?,
- Function? onChange,
- Function? onKeyDown,
- Function? onKeyUp,
})
Implementation
Element input<T>({
String? type,
String? name,
T? value,
String? placeholder,
String? id,
String? className,
Map<String, dynamic>? attributes,
FutureOr<void> Function(T)? onInput,
Function? onChange,
Function? onKeyDown,
Function? onKeyUp,
}) => h(
'input',
id: id,
className: className,
attributes: {
'type': type,
'name': name,
'value': value,
'placeholder': placeholder,
...?attributes,
},
events: {
if (onInput != null) 'input': onInput,
if (onChange != null) 'change': onChange,
if (onKeyDown != null) 'keydown': onKeyDown,
if (onKeyUp != null) 'keyup': onKeyUp,
},
selfClosing: true,
);