input<T> function

Element input<T>({
  1. String? type,
  2. String? name,
  3. T? value,
  4. String? placeholder,
  5. String? id,
  6. String? className,
  7. Map<String, dynamic>? attributes,
  8. FutureOr<void> onInput(
    1. T
    )?,
  9. Function? onChange,
  10. Function? onKeyDown,
  11. 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,
);