NestedMapApiErrorDecoder class final

Decodes Laravel-style { "errors": { "field": [...] } } responses.

Inheritance

Constructors

NestedMapApiErrorDecoder({String errorsKey = 'errors', List<String> summaryKeys = const ['message', 'error', 'detail']})
Creates a nested-map decoder.
const

Properties

errorsKey → String
Key containing field mappings.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable decoder identifier.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schema → ApiErrorSchema
Built-in schema represented by this decoder.
no setteroverride
summaryKeys → List<String>
Ordered global-summary keys.
final

Methods

canDecode(Object? data) → bool
Whether this decoder recognizes data.
inherited
confidence(Object? data) → double
Recognition confidence from 0 (no match) to 1 (certain match).
override
decode(Object? data) → Iterable<ApiErrorMessage>
Decodes data into normalized messages.
inherited
decodeResponse(Object? data) → ApiDecodedResponse
Decodes messages and response metadata.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
response(Object? data, Iterable<ApiErrorMessage> errors, {Iterable<ApiParseWarning> warnings = const [], String? problemType}) → ApiDecodedResponse
Creates a decoded response and extracts common body metadata.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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