declaration property

TypeDeclaration? declaration
final

Optional TypeDeclaration that represents the class declaration.

If provided, toClass will use this declaration to create a Class instance. This is the most precise way to reference a class as it includes complete declaration metadata.

Example

final declaration = TypeDeclaration.from(UserService);
final classType = ClassType(declaration: declaration);

Implementation

final TypeDeclaration? declaration;