NullabilitySuffix enum
Suffix indicating the nullability of a type.
This enum describes whether a ?
or *
would be used at the end of the
canonical representation of a type. It's subtly different the notions of
"nullable", "non-nullable", "potentially nullable", and "potentially
non-nullable" defined by the spec. For example, the type Null
is
nullable, even though it lacks a trailing ?
.
This enum is exposed through the analyzer API, so it should not be modified without considering the impact on analyzer clients.
Values
- question → const NullabilitySuffix
-
An indication that the canonical representation of the type under consideration ends with
?
. Types having this nullability suffix should be interpreted as being unioned with the Null type. - star → const NullabilitySuffix
-
An indication that the canonical representation of the type under consideration ends with
*
. Types having this nullability suffix are called "legacy types"; it has not yet been determined whether they should be unioned with the Null type. - none → const NullabilitySuffix
-
An indication that the canonical representation of the type under consideration does not end with either
?
or*
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Constants
-
values
→ const List<
NullabilitySuffix> - A constant List of the values in this enum, in order of their declaration.