Media class abstract

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

Inheritance
Implementers
Available extensions

Constructors

Media({required String src, List<String>? fallback, String? poster, String? alt, String? width, String? height, void onLoad(Event)?, void onError(Event)?, void onAbort(Event)?, String tag = "div", String? className, List<Component>? children, String? id, Map<String, String>? attributes, Map<String, dynamic>? style, void onClick(Event)?, void onDoubleClick(Event)?, void onContextMenu(Event)?, void onDragStart(Event)?, void onDrag(Event)?, void onDragEnd(Event)?, void onDragEnter(Event)?, void onDragOver(Event)?, void onDragLeave(Event)?, void onDrop(Event)?, void onKeyDown(Event)?, void onKeyPress(Event)?, void onKeyUp(Event)?, void onMouseOver(Event)?, void onMouseOut(Event)?, void onMouseDown(Event)?, void onMouseUp(Event)?, void onMouseMove(Event)?, void onInput(Event)?, void onChange(Event)?, void onSubmit(Event)?, void onFocus(Event)?, void onBlur(Event)?, void onScroll(Event)?})
Base class for all media types (image, video, audio, etc.)

Properties

alt String?
The alternative text for the media.
final
attributes Map<String, String>?
The attributes of the element.
finalinherited
children List<Component>?
The children of the element.
finalinherited
className String?
Css class name of the element.
finalinherited
element HTMLElement?
getter/setter pairinherited
eventListeners List<Map<String, dynamic>>
getter/setter pairinherited
fallback List<String>?
Optional fallback for the media source.
final
hashCode int
The hash code for this object.
no setterinherited
height String?
The height of the media.
final
id String?
The id of the element.
finalinherited
onAbort → void Function(Event)?
The function to call when the media is aborted.
final
onBlur → void Function(Event)?
finalinherited
onChange → void Function(Event)?
finalinherited
onClick → void Function(Event)?
Callback for the click event.
finalinherited
onContextMenu → void Function(Event)?
Callback for the contextmenu event.
finalinherited
onDoubleClick → void Function(Event)?
Callback for the doubleclick event.
finalinherited
onDrag → void Function(Event)?
finalinherited
onDragEnd → void Function(Event)?
finalinherited
onDragEnter → void Function(Event)?
finalinherited
onDragLeave → void Function(Event)?
finalinherited
onDragOver → void Function(Event)?
finalinherited
onDragStart → void Function(Event)?
finalinherited
onDrop → void Function(Event)?
finalinherited
onError → void Function(Event)?
The function to call when the media fails to load.
final
onFocus → void Function(Event)?
finalinherited
onInput → void Function(Event)?
finalinherited
onKeyDown → void Function(Event)?
finalinherited
onKeyPress → void Function(Event)?
finalinherited
onKeyUp → void Function(Event)?
finalinherited
onLoad → void Function(Event)?
The function to call when the media is loaded.
final
onMouseDown → void Function(Event)?
finalinherited
onMouseMove → void Function(Event)?
finalinherited
onMouseOut → void Function(Event)?
finalinherited
onMouseOver → void Function(Event)?
finalinherited
onMouseUp → void Function(Event)?
finalinherited
onScroll → void Function(Event)?
finalinherited
onStackChange StreamController<(String, Component)>
getter/setter pairinherited
onSubmit → void Function(Event)?
finalinherited
onWheel → void Function(Event)?
finalinherited
poster String?
The poster of the media if it is a video.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
src String
The source of the media. If the browser supports the media type, it will be displayed, otherwise the optional fallback will be used.
final
style Map<String, dynamic>?
The style of the element.
finalinherited
tag String
The tag name of the element.
finalinherited
width String?
The width of the media.
final

Methods

addEventListener(String event, void callback(Event), {Map<String, String>? options}) → void
inherited
append(Component child) → void
inherited
clear() → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
inherited
removeEventListener(String event, void callback(Event), {Map<String, String>? options}) → void
inherited
render() Element
Creates an HTML Element represention of Component.
override
toString() String
A string representation of this object.
inherited
update() → void
Re-renders the component.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited