ASTConstructorParameterDeclaration<T> class

Inheritance

Constructors

ASTConstructorParameterDeclaration(ASTType type, String name, int index, bool optional, {bool thisParameter = false, bool superParameter = false, String? fieldName, bool isRequired = false})

Properties

children → Iterable<ASTNode>
The children nodes of this node.
no setterinherited
defaultValue ↔ ASTExpression?
The default-value expression used when this parameter is omitted at the call site (optional/named parameters only), e.g. int a = 5. null when the parameter has no default. Set by the parser after construction.
getter/setter pairinherited
descendantChildren → List<ASTNode>
Return the children and it's descendant children (unmodifiable).
no setterinherited
fieldName → String
The instance field this parameter initializes — name unless the declaration renamed it (see _fieldName).
no setter
hashCode → int
The hash code for this object.
no setterinherited
index → int
final
isFieldRenamed → bool
Whether the field written differs from the parameter name.
no setter
isRequired → bool
Whether the declaration was marked required (Dart named parameters).
finalinherited
name → String
finalinherited
optional → bool
final
parentNode → ASTNode?
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
superParameter → bool
Whether this parameter initializes an inherited field (super.x).
no setter
thisParameter → bool
final
type → ASTType
no setterinherited

Methods

associateToType(ASTTypedNode node) → void
inherited
cacheDescendantChildren() → void
Mark that this node can cache its descendantChildren.
inherited
getNodeIdentifier(String name, {ASTNode? requester}) → ASTNode?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveDefaultValue(VMContext context) → FutureOr<ASTValue?>
Resolves this parameter's defaultValue to a value in context, or null when there is no default.
inherited
resolveNode(ASTNode? parentNode) → void
override
resolveRuntimeType(VMContext context, ASTNode? node) → FutureOr<ASTType>
inherited
resolveType(VMContext? context) → FutureOr<ASTType>
inherited
toASTFunctionParameterDeclaration() → ASTFunctionParameterDeclaration
toString() → String
A string representation of this object.
inherited
toValue(VMContext context, Object? v) → FutureOr<ASTValue?>
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

publicizeNamedParameters(List<ASTConstructorParameterDeclaration> named) → List<ASTConstructorParameterDeclaration>
Applies the private named parameter rule to a {named} group: an initializing formal this._x keeps writing the private field _x, while callers pass it as x: (Dart 3.12).
publicNameOfPrivate(String name) → String?
The public name of the private name name, or null when it has none: not private, or nothing usable left once the leading _ is dropped (_x → x, but __x and _ have no public name).