AstWidget class sealed
Represents an abstract syntax tree node for a Flutter widget.
To add a new widget:
- Create a new subclass of AstWidget in this file.
- In Parser, add a new case to the
flutterWidgetDeclaration
method to parse the new widget type. - In Evaluator, add a new case to the
_evaluateWidget
method to evaluate and create the corresponding Flutter widget.
Example:
class MyNewWidget extends AstWidget {
final AstNode someProperty;
const MyNewWidget(Token name, this.someProperty) : super(name);
}
Properties
Methods
-
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