Pick class

A picked object holding the value (may be null) and giving access to useful parsing functions

Implementers
Available Extensions

Constructors

Pick(Object? value, {List<Object> path = const [], Map<String, dynamic>? context})
Pick constructor when being able to drill down path all the way to reach the value. value may still be null but the structure was correct, therefore isAbsent will always return false.
Pick.absent(int missingValueAtIndex, {List<Object> path = const [], Map<String, Object?>? context})
Pick of an absent value. While drilling down path the structure of the data did not match the path and the value wasn't found.

Properties

context Map<String, dynamic>
Attaches additional information which can be used during parsing. i.e the HTTP request/response including headers
final
debugParsingExit String
Returns a human readable String of the requested path and the actual parsed value following the path along (followablePath).
no setter
followablePath List<Object>
The path segments containing non-null values parsing could follow along
no setter
hashCode int
The hash code for this object.
no setterinherited
index int?
The index of the object when it is an element in a List
no setter
isAbsent bool
Allows the distinction between the actual value null and the value not being available
no setter
missingValueAtIndex int?
When the picked value is unavailable (Pick.isAbsent) the index in path which couldn't be found
no setter
path List<Object>
The full path to value inside of the object
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Object?
The picked value, might be null
final

Methods

call([Object? arg0, Object? arg1, Object? arg2, Object? arg3, Object? arg4, Object? arg5, Object? arg6, Object? arg7, Object? arg8, Object? arg9]) Pick
fromContext(String key, [Object? arg0, Object? arg1, Object? arg2, Object? arg3, Object? arg4, Object? arg5, Object? arg6, Object? arg7, Object? arg8]) Pick
Pick values from the context using the Pick API
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
required() RequiredPick
Enter a "required" context which requires the picked value to be non-null or a PickException is thrown.
toString() String
A string representation of this object.
override
withContext(String key, Object? value) Pick
Attaches additional information which can be used during parsing. i.e the HTTP request/response including headers

Operators

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