FormalParameterList class
The formal parameter list of a method declaration, function declaration, or function type alias.
While the grammar requires all optional formal parameters to follow all of the normal formal parameters and at most one grouping of optional formal parameters, this class does not enforce those constraints. All parameters are flattened into a single list, which can have any or all kinds of parameters (normal, named, and positional) in any order.
formalParameterList ::= '(' ')' | '(' normalFormalParameters (',' optionalFormalParameters)? ')' | '(' optionalFormalParameters ')'
formalParameters ::= FormalParameter (',' FormalParameter)*
optionalFormalParameters ::= optionalPositionalFormalParameters | namedFormalParameters
optionalPositionalFormalParameters ::= '[' DefaultFormalParameter (',' DefaultFormalParameter)* ']'
namedFormalParameters ::= '{' DefaultFormalParameter (',' DefaultFormalParameter)* '}'
- Implemented types
Constructors
-
FormalParameterList(List<
FormalParameter?> parameterList)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
parameterList
↔ List<
FormalParameter?> -
getter/setter pair
- 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
Static Methods
-
fromAst(
Map? ast) → FormalParameterList?