Component constructor
Component({
- String? id,
- String tag = "div",
- Map<
String, String> ? attributes, - List<
Component> ? children, - String? className,
- Map<
String, dynamic> ? style, - void onClick()?,
- void onDoubleClick()?,
- void onContextMenu()?,
- void onDragStart()?,
- void onDrag()?,
- void onDragEnd()?,
- void onDragEnter()?,
- void onDragOver()?,
- void onDragLeave()?,
- void onDrop()?,
- void onKeyDown()?,
- void onKeyPress()?,
- void onKeyUp()?,
- void onMouseOver()?,
- void onMouseOut()?,
- void onMouseDown()?,
- void onMouseUp()?,
- void onMouseMove()?,
- void onInput()?,
- void onChange()?,
- void onSubmit()?,
- void onFocus()?,
- void onBlur()?,
- void onScroll()?,
- void onWheel()?,
This is the base building block for all components.
It inherits the behavior of Element and adds additional functionality such as rendering and updating the component.
Components are the building blocks of a UI. They can be composed together to create complex UIs.
Implementation
Component({
this.id,
this.tag = "div",
this.attributes,
this.children,
this.className,
this.style,
this.onClick,
this.onDoubleClick,
this.onContextMenu,
this.onDragStart,
this.onDrag,
this.onDragEnd,
this.onDragEnter,
this.onDragOver,
this.onDragLeave,
this.onDrop,
this.onKeyDown,
this.onKeyPress,
this.onKeyUp,
this.onMouseOver,
this.onMouseOut,
this.onMouseDown,
this.onMouseUp,
this.onMouseMove,
this.onInput,
this.onChange,
this.onSubmit,
this.onFocus,
this.onBlur,
this.onScroll,
this.onWheel,
});