AstWidget class sealed

Represents an abstract syntax tree node for a Flutter widget.

To add a new widget:

  1. Create a new subclass of AstWidget in this file.
  2. In Parser, add a new case to the flutterWidgetDeclaration method to parse the new widget type.
  3. 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);
}
Inheritance
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
name Token
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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