OrNullEncodable<T> class
An Encodable that can encode T
or null.
Prefer using AsNullableEncodable.orNull
instead of the constructor.
- Implemented types
-
- Encodable<
T?>
- Encodable<
- Available extensions
Constructors
-
OrNullEncodable.new(Encodable<
T> codable) -
const
Properties
-
codable
→ Encodable<
T> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
orNull
→ Encodable<
T?> -
Available on Encodable<
Returns an Encodable that can encodeT> , provided by the AsNullableListEncodable extensionT
or null.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
encode(
T? value, Encoder encoder) → void -
Encodes the
value
using theencoder
.override -
future(
) → Encodable< Future< T> > -
Available on Encodable<
Returns an Encodable that can encode a future ofT> , provided by the AsFutureEncodable extensionT
. -
list(
) → Encodable< List< T> > -
Available on Encodable<
Returns an Encodable that can encode a list ofT> , provided by the AsListEncodable extensionT
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
) → Encodable< Set< T> > -
Available on Encodable<
Returns an Encodable that can encode a set ofT> , provided by the AsSetEncodable extensionT
. -
stream(
) → Encodable< Stream< T> > -
Available on Encodable<
Returns an Encodable that can encode a stream ofT> , provided by the AsFutureEncodable extensionT
. -
toCsv(
Iterable< T> value) → String -
Available on Encodable<
Encodes a list of objects into a CSV string.T> , provided by the CsvEncodable extension -
toCsvBytes(
Iterable< T> value) → List<int> -
Available on Encodable<
T> , provided by the CsvEncodable extension -
toJson(
T value) → String -
Available on Encodable<
T> , provided by the JsonEncodable extension -
toJsonBytes(
T value) → List< int> -
Available on Encodable<
T> , provided by the JsonEncodable extension -
toMap(
T value) → Map< String, dynamic> -
Available on Encodable<
T> , provided by the StandardEncodable extension -
toMsgPack(
T value) → List< int> -
Available on Encodable<
T> , provided by the MsgPackEncodable extension -
toProgressiveJson(
T value) → List< int> -
Available on Encodable<
T> , provided by the ProgressiveJsonEncodable extension -
toProgressiveJsonStream(
T value) → Stream< List< int> > -
Available on Encodable<
Encodes the value to a Stream of progressive JSON bytes.T> , provided by the ProgressiveJsonEncodable extension -
toString(
) → String -
A string representation of this object.
inherited
-
toValue(
T value) → Object? -
Available on Encodable<
T> , provided by the StandardEncodable extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited