FailureFactory typedef

FailureFactory = Failure Function(Map<String, dynamic> json)

Builds the Failure for a mapped response body.

Factories return a Failure only — mapping a response to a substitute success value is deliberately not supported (handle such recoveries in the repository, e.g. via onEndpointError).

Implementation

typedef FailureFactory = Failure Function(Map<String, dynamic> json);