SRegularFormalParameter class

A parameter declared by name: int x, [int x = 0], {required int x}, int cb(String s). Mirrors analyzer's RegularFormalParameter.

Inheritance

Constructors

SRegularFormalParameter({required int offset, required int length, SSimpleIdentifier? name, STypeAnnotation? type, List<SAnnotation> metadata = const [], bool isConst = false, bool isFinal = false, bool isCovariant = false, bool isRequired = true, bool isNamed = false, SFormalParameterDefaultClause? defaultClause, SFunctionTypedFormalParameterSuffix? functionTypedSuffix})
SRegularFormalParameter.fromJson(Map<String, dynamic> json)
factory

Properties

defaultClause → SFormalParameterDefaultClause?
= value, when the parameter declares a default.
finalinherited
end → int
Get the end offset
no setterinherited
functionTypedSuffix → SFunctionTypedFormalParameterSuffix?
(params) after the name of a function-typed parameter.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
isConst → bool
finalinherited
isCovariant → bool
finalinherited
isFinal → bool
finalinherited
isNamed → bool
Whether the parameter is declared inside {}.
finalinherited
isOptional → bool
no setterinherited
isOptionalNamed → bool
no setterinherited
isOptionalPositional → bool
no setterinherited
isPositional → bool
no setterinherited
isRequired → bool
A positional parameter outside [], or a named one marked required.
finalinherited
isRequiredNamed → bool
no setterinherited
isRequiredPositional → bool
no setterinherited
length → int
Length of the source text
finalinherited
metadata → List<SAnnotation>
finalinherited
name → SSimpleIdentifier?
The parameter's name; null only in invalid code.
finalinherited
nodeType → String
Unique node type identifier for serialization
no setteroverride
offset → int
Source offset of the node
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → STypeAnnotation?
The declared type, or for a function-typed parameter its return type.
finalinherited

Methods

accept<T>(SAstVisitor<T> visitor) → T?
Accept a visitor and return the result.
override
equals(Object other, [List<String>? log]) → bool
Compares this node with other. If log is provided, differences are appended in a human-readable format with JSON-style paths.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Convert to JSON-serializable map
inherited
toJsonString({bool pretty = false}) → String
Serialize to JSON string
inherited
toString() → String
A string representation of this object.
inherited
visitChildren(SAstVisitor visitor) → void
Visit all child nodes of this node.
inherited

Operators

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