Component class abstract

Implementers
Available extensions

Constructors

Component({String? id, String tag = "div", Map<String, String>? attributes, List<Component>? children, String? className, 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)?, void onWheel(Event)?})
This is the base building block for all components.

Properties

attributes Map<String, String>?
The attributes of the element.
final
children List<Component>?
The children of the element.
final
className String?
Css class name of the element.
final
element HTMLElement?
getter/setter pair
eventListeners List<Map<String, dynamic>>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String?
The id of the element.
final
onBlur → void Function(Event)?
final
onChange → void Function(Event)?
final
onClick → void Function(Event)?
Callback for the click event.
final
onContextMenu → void Function(Event)?
Callback for the contextmenu event.
final
onDoubleClick → void Function(Event)?
Callback for the doubleclick event.
final
onDrag → void Function(Event)?
final
onDragEnd → void Function(Event)?
final
onDragEnter → void Function(Event)?
final
onDragLeave → void Function(Event)?
final
onDragOver → void Function(Event)?
final
onDragStart → void Function(Event)?
final
onDrop → void Function(Event)?
final
onFocus → void Function(Event)?
final
onInput → void Function(Event)?
final
onKeyDown → void Function(Event)?
final
onKeyPress → void Function(Event)?
final
onKeyUp → void Function(Event)?
final
onMouseDown → void Function(Event)?
final
onMouseMove → void Function(Event)?
final
onMouseOut → void Function(Event)?
final
onMouseOver → void Function(Event)?
final
onMouseUp → void Function(Event)?
final
onScroll → void Function(Event)?
final
onStackChange StreamController<(String, Component)>
getter/setter pair
onSubmit → void Function(Event)?
final
onWheel → void Function(Event)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style Map<String, dynamic>?
The style of the element.
final
tag String
The tag name of the element.
final

Methods

addClass(String className) → void

Available on Component, provided by the Find extension

addEventListener(String event, void callback(Event), {Map<String, String>? options}) → void
append(Component child) → void
attr(String name, [String? value]) String?

Available on Component, provided by the Find extension

clear() → void
hasClass(String className) → void

Available on Component, provided by the Find extension

hide() → void

Available on Component, provided by the Find extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
removeAtptr(String name) → void

Available on Component, provided by the Find extension

removeClass(String className) → void

Available on Component, provided by the Find extension

removeEventListener(String event, void callback(Event), {Map<String, String>? options}) → void
render() Element
Creates an HTML Element represention of Component.
show([String? display]) → void

Available on Component, provided by the Find extension

toggle([String? display]) → void

Available on Component, provided by the Find extension

toggleClass(String className) → void

Available on Component, provided by the Find extension

toString() String
A string representation of this object.
inherited
update() → void
Re-renders the component.

Operators

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