NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #3482 most downloaded on pub.dev
playx_network is a Wrapper around Dio that can perform api request with better error handling and easily get the result of any api request.
Latest stable
2.0.0
Last release 13 days ago
10 Nov 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 23 of 25 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
25 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
A major release: it raises the minimum Dart and Flutter versions and adds new exception types (see the breaking changes below). It brings streaming, p…
A major release: it raises the minimum Dart and Flutter versions and adds new exception types (see the breaking changes below). It brings streaming, path parameters, custom error objects, a finer-grained set of connection errors, and many fixes to error handling. There is also a new documentation site.
playx_core ^2.0.0 requires Dart >=3.12.0 and Flutter >=3.44.0, so these are now the minimum versions of playx_network too.NetworkException is a sealed class, so an exhaustive switch over it must handle the new subclasses ServerUnreachableException, CorsException, SecureConnectionException and ReceiveTimeoutException (or keep a catch-all case).receiveTimeout is now a ReceiveTimeoutException instead of a SendTimeoutException. Code that caught SendTimeoutException for slow responses should also catch ReceiveTimeoutException.getStream and postStream consume streaming endpoints (SSE, NDJSON, chunked text and binary) through the new sealed NetworkStreamResult, which has when, map, mapAsync, mapStream, mapStreamAsync and toList().getSse and postSse are conveniences for Server-Sent Events, with the PlayxSseEvent model. They send Accept: text/event-stream.PlayxStreamFormat selects how bytes are decoded: bytes, text, json (one JSON document per line, NDJSON) or sse.toList() returns a NetworkResult.error if the stream errors. It never completes for endless streams.options.headers instead of replacing them. The idle receive timeout is disabled unless options.receiveTimeout is set.pathParameters substitutes {placeholder} segments in the path of every request (for example 'users/{userId}' with {'userId': 42}). Values are URL-encoded.customPathParameters on PlayxNetworkClient (and attachCustomPathParameters per request) supplies app-wide values, like customQuery does for query parameters.errorExtraMapper (client-level and per request) maps an error response to your own object, exposed as ApiException.extra. Read it with result.errorExtraAs<E>() or exception.extraAs<E>(), no cast needed. ErrorMapper is unchanged.treatEmptyResponseAsSuccess (default false) returns NetworkResult.success([]) for list requests that succeed with an empty body or an empty list, instead of an EmptyResponseException.fromJson is optional on delete. Without it any successful response is NetworkResult.success(null) (use delete<void>), and with it an empty body is a success and the mapper receives null.204 No Content needs successRequestCodes: [200, 201, 204]. The default is unchanged.ServerUnreachableException (connection refused, reset, closed or timed out, no route to host) and, on the web, CorsException, so not every failed connection is reported as NoInternetConnectionException. The exception is chosen from the OS error. A failure that can't be identified stays NoInternetConnectionException.hasInternetConnection callback on PlayxNetworkClient (for example backed by connectivity_plus) tells offline from unreachable reliably. It is only called after a connection failure.SecureConnectionException for rejected certificates and failed TLS handshakes (Dio reports a handshake failure as unknown or connectionError). The connectivity callback is not called for them.ExceptionMessage getters serverUnreachable, corsError, secureConnectionError and receiveTimeout. They have defaults (defaultError, and sendTimeout for receiveTimeout), so existing subclasses keep compiling. English and Arabic provide their own.InvalidFormatException. It was an UnexpectedErrorException, and the InvalidFormatException branch could never be reached.transformTimeout (parsing took too long) is an UnableToProcessException.validateStatus are handled consistently: error responses of stream requests keep the API message and extra data, and a status listed in successRequestCodes that Dio rejects (for example 304) is a success for every request type.Bad state: Future already completed. The race is handled and the request returns a RequestCanceledException. Downloads also no longer let non-Exception errors (such as a StateError) escape.DefaultApiError reads Strapi's message: [{messages: [...]}] (that branch could never run), joins list messages such as message: ["a", "b"], supports {"error": "..."}, and reads each field on its own so a wrongly typed statusCode no longer discards the message. Blank messages are treated as missing.exceptionMessages, shouldShowApiErrors and unauthorizedRequestCodes passed in a request's settings now apply to error status codes of every request type, including errors Dio throws as badResponse. Only the client-level settings were used before.Dio for per-request log settings no longer duplicates Dio's default interceptor.DioExceptionType by handling transformTimeout, introduced in Dio 5.10.playx_core ^2.0.0, dio ^5.11.1.sentry_dio >=9.16.0 <11.0.0, talker and talker_dio_logger >=5.1.16 <6.0.0, dio_web_adapter >=2.1.2 <3.0.0. sentry_dio is only re-exported; apps that move to sentry_dio 10 should read its migration notes (Android minSdk 26, Swift Package Manager on Apple platforms, span streaming on by default).package:web is now a direct dependency.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nested JSON Key Extraction: Added dataKey parameter to all network requests to extract nested JSON values before parsing.
dataKey parameter to all network requests to extract nested JSON values before parsing.itemDataKey to all list-returning requests (getList, postList, etc.) to unwrap each list item (e.g., itemDataKey: 'attributes') before passing it to the mapper.cancelTag parameter to manage and cancel multiple requests at once with automatic cancelOld support.Updated dependencies to their latest versions.
Updated dependencies to their latest versions.
> Note: This version contains breaking changes.
Note: This version contains breaking changes.
DioClient: A simple and customizable HTTP client based on Dio is now available directly from the playx_network package.pretty_dio_logger with talker_dio_logger for better log control and Talker integration.PlayxNetworkLoggerSettings to support detailed logging configuration.PlayxLogger for consistent logging across the Playx ecosystem.> Note: This version contains breaking changes.
Note: This version contains breaking changes.
Nothing published for this version
fix: bug when initializing PlayxNetworkClient.
Enhanced mapping of Dio responses with support for processing in an isolate using the work_manager package or the compute method.
Mapping Enhancements:
work_manager package or the compute method.PlayxNetworkClientSettings:
useIsolateForMappingJson: Determines whether to use an isolate for mapping JSON responses.useWorkManagerForMappingJsonInIsolate: Specifies whether to use work_manager or the compute function for JSON mapping in an isolate.PlayxNetworkClientSettings for individual requests, similar to overriding logSettings or exceptionMessages.NetworkResult Enhancements:
NetworkResult class:
isSuccess: Checks if the network call is successful.isError: Checks if the network call has failed.networkData: Returns the data if the call is successful, otherwise returns null.networkError: Returns the error if the call has failed.Asynchronous Mapping:
NetworkResult:
mapDataAsync: Maps a network response (success or error) to a desired model asynchronously.mapDataAsyncInIsolate: Maps a network response asynchronously in an isolate, with configurable options:
mapper: The function for transforming data.exceptionMessage: A message to display in case of exceptions.useWorkManager: Determines whether to use work_manager or compute for JSON mapping.mapAsyncInIsolate: Separately maps success and error cases asynchronously in an isolate, with configurable options:
success: The function for mapping successful responses.error: The function for mapping error responses.useWorkManager: Determines whether to use work_manager or compute.fix: Bug causing error not being reported successfully.
sentry_diopackage to v8.11.0.Add ability to download content using dio download method.
download method.Nothing published for this version
> Note: This version contains breaking changes.
Note: This version contains breaking changes.
PlayxNetworkClient Settings:
PlayxNetworkClient into a new PlayxNetworkClientSettings class.LoggerSettings to PlayxNetworkLoggerSettings.attachCustomQuery option.Enhanced PlayxNetworkLoggerSettings:
attachLoggerOnDebug and attachLoggerOnRelease).Updated Dio Package:
Integrated Dart's Isolate to handle data processing in network responses, offloading CPU-intensive tasks to separate threads, which improves app perfo
Isolate to handle data processing in network responses, offloading CPU-intensive tasks to separate threads, which improves app performance, particularly in scenarios involving large datasets.JsonMapper Signature:
JsonMapper<T> signature has been updated from T Function(dynamic json) to FutureOr<T> Function(dynamic json) to support both synchronous and asynchronous JSON processing. This allows for more flexible and efficient handling of JSON data.getList and postList methods did not return results when the API response was not a list. Now, proper error handling ensures that non-list responses are processed correctly, preventing potential runtime errors.- Update packages.
> Note: This version contains breaking changes.
Note: This version contains breaking changes.
onUnauthorizedRequestReceived callback to take Response instead of void to be able to customize unauthorized error handling based on response.name field for default error model.Add unauthorizedRequestCodes to be able to handle different unauthorized request status codes returned from the api and fire onUnauthorizedRequestRece
Add statusCode to ApiException to be able to handle different error status codes returned from the api.
statusCode to ApiException to be able to handle different error status codes returned from the api.Bug fix, causing onUnauthorizedRequestReceived not called when receiving unauthorized request on certain cases.
onUnauthorizedRequestReceived not called when receiving unauthorized request on certain cases.[Breaking Change]! : Each Network Exception now takes errorMessage of type String instead of exceptionMessage
Enhancements for default error model.
Make customHeaders to be of type function that return a map to be updated correctly.
customHeaders to be of type function that return a map to be updated correctly.fix some bugs causing error not being reported successfully.
update from json to take dynamic json instead of map.
- initial release
One column per quarter.