WidgetDeclaration class
A description of a widget in a remote widget library.
The root must be either a ConstructorCall or a Switch that evaluates to a ConstructorCall. (In principle one can imagine that an ArgsReference that evaluates to a ConstructorCall would also be valid, but such a construct would be redundant and would not provide any additional expressivity, so it is disallowed.)
The tree rooted at root must not contain (directly or indirectly) a ConstructorCall that references the widget declared by this WidgetDeclaration: widget loops, even indirect loops or loops that would in principle be terminated by use of a Switch, are not allowed.
Constructors
- WidgetDeclaration(String name, DynamicMap? initialState, BlobNode root)
-
Binds the given
name
to the definition given byroot
.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialState → DynamicMap?
-
If non-null, this is a stateful widget; the value is used to create the
initial copy of the state when the widget is created.
final
- name → String
-
The name of the widget that this declaration represents.
final
- root → BlobNode
-
The widget to return when this widget is used.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → SourceRange?
-
The source location that corresponds to this BlobNode, if known.
no setterinherited
Methods
-
associateSource(
SourceRange source) → void -
Assign a SourceRange to this BlobNode's
source
property.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
propagateSource(
BlobNode? original) → void -
Assign another BlobNode's SourceRange to this BlobNode's source
property.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited