Undefined class final

Sentinel used to distinguish between a missing value and an explicit null.

The encoder/merger treats Undefined as “omit this key entirely”, whereas null is typically serialized as an empty value (e.g. a=) unless strict null handling is enabled. This mirrors the behaviour of other ports of qs.

The type is immutable and intentionally trivial. Equality is structural via Equatable; all instances of Undefined compare equal, so you can freely create them with const Undefined().

Mixed-in types

Constructors

Undefined.new()
Creates a new sentinel instance. All instances are equal.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
props List<Object>
No distinguishing fields — all Undefined instances are equal.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

copyWith() Undefined
No-op copy that returns another equal sentinel. Kept for API symmetry.
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