x_flutter_core_models library

Flutter core models — failure types, server error hierarchy, and progress state for domain layers.

Import this library to access all public types:

Classes

ApiExceptionFailure
An unexpected exception was thrown while executing the request.
ApiFailure
Abstract base for all server and network failures.
ApiResponseFailure
The server returned an HTTP error response with a specific statusCode.
ApiTooManyRequestsFailure
The client has been rate-limited by the server (429).
ApiUnauthorizedFailure
The server rejected the request due to missing or invalid credentials (401).
ApiUndefinedFailure
The server returned an unrecognised or unexpected error payload.
ApiUnknownFailure
The failure reason could not be determined.
BaseProgressState
Sealed hierarchy for progress / loading state.
CanceledRequestFailure
Indicates that a request was deliberately canceled before completion.
ConnectionFailure
The device has no network connectivity.
DataResponse<T>
Standard response model for all data layers.
DataResponseFailure<T>
A failed DataResponse containing a failure reason.
DataResponseSuccess<T>
A successful DataResponse containing the requested data.
DefaultProgressState
Simple boolean progress state for show / hide loading indicators.
Failure
Marker interface for all domain failures.

Enums

ServerFailure
Categorises the kind of server or network error that occurred.

Typedefs

Result<T> = DataResponse<T>
Legacy alias for DataResponse.