Widget class abstract

The base class for all widgets, analogous to Flutter's Widget.

Widgets are immutable descriptions of part of a user interface. Each widget describes its own createElement method which creates an Element that manages the widget's position in the tree.

Implementers

Constructors

Widget({Key? key})
Creates a Widget.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another in the tree.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() Element
Creates the Element for this widget.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

canUpdate(Widget oldWidget, Widget newWidget) bool
Whether newWidget can be used to update an element that currently has oldWidget as its configuration.