ClassDeclarationBuilder class Null safety

The api used by DeclarationMacros to contribute new declarations to the current class.

Note that this is available to macros that run directly on classes, as well as macros that run on any members of a class.

Implemented types

Constructors

ClassDeclarationBuilder()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addToClass(Declaration declaration) → void
Adds a new declaration to the surrounding class.
addToLibrary(Declaration declaration) → void
Adds a new regular declaration to the surrounding library. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
typeDeclarationOf<T>() TypeDeclaration
Used to construct a TypeReference to a runtime type available to the the macro implementation code.
inherited

Operators

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