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(
- Event
)?,
- dynamic onChange(
- Event
)?,
- dynamic onKeyDown(
- KeyboardEvent
)?,
- dynamic onKeyUp(
- KeyboardEvent
)?,
})
Implementation
Element input<T>({
String? type,
String? name,
T? value,
String? placeholder,
String? id,
String? className,
Map<String, dynamic>? attributes,
FutureOr<void> Function(web.Event)? onInput,
Function(web.Event)? onChange,
Function(web.KeyboardEvent)? onKeyDown,
Function(web.KeyboardEvent)? onKeyUp,
}) => h(
'input',
id: id,
className: className,
attributes: {
'type': type,
'name': name,
'value': value,
'placeholder': placeholder,
...?attributes,
},
events: {
'input': ?onInput,
'change': ?onChange,
'keydown': ?onKeyDown,
'keyup': ?onKeyUp,
},
selfClosing: true,
);