Media constructor

Media({
  1. required String src,
  2. List<String>? fallback,
  3. String? poster,
  4. String? alt,
  5. String? width,
  6. String? height,
  7. void onLoad(
    1. Event
    )?,
  8. void onError(
    1. Event
    )?,
  9. void onAbort(
    1. Event
    )?,
  10. String tag = "div",
  11. String? className,
  12. List<Component>? children,
  13. String? id,
  14. Map<String, String>? attributes,
  15. Map<String, dynamic>? style,
  16. void onClick(
    1. Event
    )?,
  17. void onDoubleClick(
    1. Event
    )?,
  18. void onContextMenu(
    1. Event
    )?,
  19. void onDragStart(
    1. Event
    )?,
  20. void onDrag(
    1. Event
    )?,
  21. void onDragEnd(
    1. Event
    )?,
  22. void onDragEnter(
    1. Event
    )?,
  23. void onDragOver(
    1. Event
    )?,
  24. void onDragLeave(
    1. Event
    )?,
  25. void onDrop(
    1. Event
    )?,
  26. void onKeyDown(
    1. Event
    )?,
  27. void onKeyPress(
    1. Event
    )?,
  28. void onKeyUp(
    1. Event
    )?,
  29. void onMouseOver(
    1. Event
    )?,
  30. void onMouseOut(
    1. Event
    )?,
  31. void onMouseDown(
    1. Event
    )?,
  32. void onMouseUp(
    1. Event
    )?,
  33. void onMouseMove(
    1. Event
    )?,
  34. void onInput(
    1. Event
    )?,
  35. void onChange(
    1. Event
    )?,
  36. void onSubmit(
    1. Event
    )?,
  37. void onFocus(
    1. Event
    )?,
  38. void onBlur(
    1. Event
    )?,
  39. void onScroll(
    1. Event
    )?,
})

Base class for all media types (image, video, audio, etc.)

Implementation

Media({
  required this.src,
  this.fallback,
  this.poster,
  this.alt,
  this.width,
  this.height,
  this.onLoad,
  this.onError,
  this.onAbort,
  super.tag,
  super.className,
  super.children,
  super.id,
  super.attributes,
  super.style,
  super.onClick,
  super.onDoubleClick,
  super.onContextMenu,
  super.onDragStart,
  super.onDrag,
  super.onDragEnd,
  super.onDragEnter,
  super.onDragOver,
  super.onDragLeave,
  super.onDrop,
  super.onKeyDown,
  super.onKeyPress,
  super.onKeyUp,
  super.onMouseOver,
  super.onMouseOut,
  super.onMouseDown,
  super.onMouseUp,
  super.onMouseMove,
  super.onInput,
  super.onChange,
  super.onSubmit,
  super.onFocus,
  super.onBlur,
  super.onScroll,
});