OrNullDecodable<T> class
A Decodable implementation that can decode T
or null.
Prefer using AsNullableDecodable.orNull instead of the constructor.
- Implemented types
-
- ComposedDecodable1<
T?, T>
- ComposedDecodable1<
- Available extensions
Constructors
-
OrNullDecodable.new(Decodable<
T> codable) -
const
Properties
-
codable
→ Decodable<
T> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
orNull
→ Decodable<
T?> -
Available on Decodable<
Returns a Decodable object that can decodeT> , provided by the AsNullableDecodable extensionT
or null.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
Decoder decoder) → T? -
Decodes a value of type
T
using thedecoder
.inherited -
extract<
R> (R fn< A>(Decodable< ) → RA> ? codableA) -
Extracts the child Decodable for the type parameter
A
from the composed Decodable for type T.inherited -
fromCsv(
String csv) → List< T> -
Available on Decodable<
Decodes a CSV string into a list of objects.T> , provided by the CsvDecodable extension -
fromCsvBytes(
List< int> bytes) → List<T> -
Available on Decodable<
T> , provided by the CsvDecodable extension -
fromJson(
String json) → T -
Available on Decodable<
T> , provided by the JsonDecodable extension -
fromJsonBytes(
List< int> bytes) → T -
Available on Decodable<
T> , provided by the JsonDecodable extension -
fromMap(
Map< String, dynamic> map) → T -
Available on Decodable<
T> , provided by the StandardDecodable extension -
fromMsgPack(
List< int> bytes) → T -
Available on Decodable<
T> , provided by the MsgPackDecodable extension -
fromProgressiveJson(
List< int> bytes) → T -
Available on Decodable<
Decodes progressive JSON bytes intoT> , provided by the ProgressiveJsonDecodable extensionT
. -
fromProgressiveJsonStream(
Stream< List< bytes) → Stream<int> >T> -
Available on Decodable<
Decodes a progressive JSON byte stream into a Stream ofT> , provided by the ProgressiveJsonDecodable extensionT
. -
fromValue(
Object? value) → T -
Available on Decodable<
T> , provided by the StandardDecodable extension -
future(
) → Decodable< Future< T> > -
Available on Decodable<
Returns a Decodable object that can decode a future ofT> , provided by the AsAsyncDecodable extensionT
. -
list(
) → Decodable< List< T> > -
Available on Decodable<
Returns a Decodable object that can decode a list ofT> , provided by the AsListDecodable extensionT
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
) → Decodable< Set< T> > -
Available on Decodable<
Returns a Decodable object that can decode a set ofT> , provided by the AsSetDecodable extensionT
. -
stream(
) → Decodable< Stream< T> > -
Available on Decodable<
Returns a Decodable object that can decode a stream ofT> , provided by the AsAsyncDecodable extensionT
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited