PayloadMapX extension

Typed read helpers for durable task-argument and workflow-parameter maps.

on

Methods

requiredValue<T>(String key, {PayloadCodec<T>? codec}) → T

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded value for key, throwing when it is missing.
requiredValueJson<T>(String key, {required T decode(Map<String, dynamic> payload), String? typeName}) → T

Available on Map<String, Object?>, provided by the PayloadMapX extension

Decodes the value for key as a typed DTO, throwing when absent.
requiredValueList<T>(String key, {PayloadCodec<T>? codec}) List<T>

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded list value for key, throwing when it is missing.
requiredValueListJson<T>(String key, {required T decode(Map<String, dynamic> payload), String? typeName}) List<T>

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded DTO list value for key, throwing when absent.
requiredValueListVersionedJson<T>(String key, {required T decode(Map<String, dynamic> payload, int version), int defaultVersion = 1, int? defaultDecodeVersion, String? typeName}) List<T>

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded version-aware DTO list value for key, throwing when absent.
requiredValueVersionedJson<T>(String key, {required T decode(Map<String, dynamic> payload, int version), int defaultVersion = 1, int? defaultDecodeVersion, String? typeName}) → T

Available on Map<String, Object?>, provided by the PayloadMapX extension

Decodes the value for key as a version-aware typed DTO, throwing when absent.
value<T>(String key, {PayloadCodec<T>? codec}) → T?

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded value for key, or null when the payload is absent.
valueJson<T>(String key, {required T decode(Map<String, dynamic> payload), String? typeName}) → T?

Available on Map<String, Object?>, provided by the PayloadMapX extension

Decodes the value for key as a typed DTO with a JSON decoder.
valueJsonOr<T>(String key, T fallback, {required T decode(Map<String, dynamic> payload), String? typeName}) → T

Available on Map<String, Object?>, provided by the PayloadMapX extension

Decodes the value for key as a typed DTO, or fallback when absent.
valueList<T>(String key, {PayloadCodec<T>? codec}) List<T>?

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded list value for key, or null when it is absent.
valueListJson<T>(String key, {required T decode(Map<String, dynamic> payload), String? typeName}) List<T>?

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded DTO list value for key, or null when it is absent.
valueListJsonOr<T>(String key, List<T> fallback, {required T decode(Map<String, dynamic> payload), String? typeName}) List<T>

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded DTO list value for key, or fallback when absent.
valueListOr<T>(String key, List<T> fallback, {PayloadCodec<T>? codec}) List<T>

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded list value for key, or fallback when it is absent.
valueListVersionedJson<T>(String key, {required T decode(Map<String, dynamic> payload, int version), int defaultVersion = 1, int? defaultDecodeVersion, String? typeName}) List<T>?

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded version-aware DTO list value for key, or null when it is absent.
valueListVersionedJsonOr<T>(String key, List<T> fallback, {required T decode(Map<String, dynamic> payload, int version), int defaultVersion = 1, int? defaultDecodeVersion, String? typeName}) List<T>

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded version-aware DTO list value for key, or fallback when absent.
valueOr<T>(String key, T fallback, {PayloadCodec<T>? codec}) → T

Available on Map<String, Object?>, provided by the PayloadMapX extension

Returns the decoded value for key, or fallback when it is absent.
valueVersionedJson<T>(String key, {required T decode(Map<String, dynamic> payload, int version), int defaultVersion = 1, int? defaultDecodeVersion, String? typeName}) → T?

Available on Map<String, Object?>, provided by the PayloadMapX extension

Decodes the value for key as a typed DTO with a version-aware JSON decoder.
valueVersionedJsonOr<T>(String key, T fallback, {required T decode(Map<String, dynamic> payload, int version), int defaultVersion = 1, int? defaultDecodeVersion, String? typeName}) → T

Available on Map<String, Object?>, provided by the PayloadMapX extension

Decodes the value for key as a version-aware typed DTO, or fallback when absent.