Variant class final

One arm of a SelectExpression: a [key] pattern pair.

isDefault is true for the variant marked with *[key]. Exactly one variant per SelectExpression is the default.

Inheritance

Constructors

Variant({required VariantKey key, required Pattern value, required bool isDefault, Span? span})
Bundles one variant's key, value pattern, and default flag.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDefault → bool
True for the *-marked default variant.
final
key → VariantKey
The variant key ([one], [windows], [3]).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
span → Span?
Source range this node covers; null when spans were off.
final
value → Pattern
The pattern this variant renders.
final

Methods

clone() → Variant
Deep clone of this node.
override
equals(FluentNode other, {bool ignoreSpans = true}) → bool
Structural equality.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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