ParameterKind class

The kind of a parameter. A parameter can be either positional or named, and can be either required or optional.

Implemented types

Constructors

ParameterKind(String name, int ordinal, bool isNamed, bool isOptional)
Initialize a newly created kind with the given state.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, override
isNamed bool
A flag indicating whether this is a named or positional parameter.
final
isOptional bool
A flag indicating whether this is an optional or required parameter.
final
name String
The name of this parameter.
final
ordinal int
The ordinal value of the parameter.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

compareTo(ParameterKind other) int
Compares this object to another object. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

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

Constants

NAMED → const ParameterKind
A named optional parameter.
ParameterKind('NAMED', 2, true, true)
NAMED_REQUIRED → const ParameterKind
A named required parameter.
ParameterKind('NAMED_REQUIRED', 2, true, false)
POSITIONAL → const ParameterKind
A positional optional parameter.
ParameterKind('POSITIONAL', 1, false, true)
REQUIRED → const ParameterKind
A positional required parameter.
ParameterKind('REQUIRED', 0, false, false)
values → const List<ParameterKind>
[REQUIRED, POSITIONAL, NAMED_REQUIRED, NAMED]