AcpField<T extends Object> class sealed

A wire field that distinguishes absence, an explicit null, and a value.

Implementers
Annotations
  • @immutable

Constructors

AcpField.absent()
Creates a field that was not present on the wire.
const
factory
AcpField.nullValue()
Creates a field that was present with the JSON value null.
const
factory
AcpField.value(T value)
Creates a field that was present with value.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hasValue bool
Whether this field has a non-null value.
no setter
isAbsent bool
Whether this field was absent on the wire.
no setter
isNull bool
Whether this field was explicitly null on the wire.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valueOrNull → T?
The non-null value, or null when the field is absent or explicitly null.
no setter

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