playx_network
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.
1.0.0
3.0K downloads/mo
#4654 most downloaded on pub.dev
playx-flutter/playx_network
What this package is like to depend on
Last release 4 months ago
02 Apr 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 22 of 24 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
24 releases · first in 2023
2 releases in the last 12 months
see the full history below
Release timeline
24 releases · Jul 2023 to Apr 2026Releases
latest 24-
1.0.002 Apr 2026Release notes
Open source →- Nested JSON Key Extraction: Added
dataKeyparameter to all network requests to extract nested JSON values before parsing. - Item-Level Nested Key Extraction: Added
itemDataKeyto all list-returning requests (getList,postList, etc.) to unwrap each list item (e.g.,itemDataKey: 'attributes') before passing it to the mapper. - Smart Request Cancellation Manager: Added
cancelTagparameter to manage and cancel multiple requests at once with automaticcancelOldsupport. - Mapping Cancellation: Better support for canceling requests during JSON mapping in isolates. Now, when a request is canceled, the mapping process is also canceled to save resources and improve performance.
- Nested JSON Key Extraction: Added
-
0.6.017 Nov 2025Release notes
Open source →- Updated dependencies to their latest versions.
- PATCH Request Support: Added new methods (patch and patchList) to easily perform PATCH API requests.
- Per-Request Error Mapping: You can now pass a custom ErrorMapper to individual API calls for more specific error handling.
- Granular Logging Control: Added new settings to control exactly what gets printed in the logs (e.g., toggle response data, request headers, etc.).
- Added dio_smart_retry package to support retrying failed requests with exponential backoff.
-
0.5.102 Jul 2025Release notes
Open source →- Updated dependencies to their latest versions.
- Enhanced logging errors and exceptions to provide more detailed information.
-
0.5.001 Jul 2025Release notes
Open source →Note: This version contains breaking changes.
New Features
- Export
DioClient: A simple and customizable HTTP client based on Dio is now available directly from theplayx_networkpackage.
Improvements
Logger Overhaul
- Replaced
pretty_dio_loggerwithtalker_dio_loggerfor better log control and Talker integration. - Updated
PlayxNetworkLoggerSettingsto support detailed logging configuration. - Integrated
PlayxLoggerfor consistent logging across the Playx ecosystem.
Other
- Updated dependencies to their latest versions.
- Bump minimum Dart SDK version to 3.5.0 and Flutter SDK version to 3.24.0.
- Migrated Android example project to Kotlin DSL.
- Export
-
0.4.012 Mar 2025 -
0.3.220 Jan 2025Nothing published for this version
-
0.3.120 Jan 2025 -
0.3.019 Jan 2025Release notes
Open source →-
Mapping Enhancements:
- Enhanced mapping of Dio responses with support for processing in an isolate using the
work_managerpackage or thecomputemethod. - Added parameters for mapping options in
PlayxNetworkClientSettings:useIsolateForMappingJson: Determines whether to use an isolate for mapping JSON responses.useWorkManagerForMappingJsonInIsolate: Specifies whether to usework_manageror thecomputefunction for JSON mapping in an isolate.
- Added the ability to override
PlayxNetworkClientSettingsfor individual requests, similar to overridinglogSettingsorexceptionMessages.
- Enhanced mapping of Dio responses with support for processing in an isolate using the
-
NetworkResult Enhancements:
- Added the following convenience getters to the
NetworkResultclass: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 returnsnull.networkError: Returns the error if the call has failed.
- Added the following convenience getters to the
-
Asynchronous Mapping:
- Introduced new mapping methods for
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 usework_managerorcomputefor 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 usework_managerorcompute.
- Introduced new mapping methods for
-
-
0.2.315 Dec 2024Release notes
Open source →- fix: Bug causing error not being reported successfully.
- feat: Update
sentry_diopackage to v8.11.0.
-
0.2.226 Sep 2024 -
0.2.119 Sep 2024Nothing published for this version
-
0.2.019 Sep 2024Release notes
Open source →Note: This version contains breaking changes.
Breaking Changes
- Combined
PlayxNetworkClientSettings:- Merged settings for
PlayxNetworkClientinto a newPlayxNetworkClientSettingsclass. - Renamed
LoggerSettingstoPlayxNetworkLoggerSettings.
- Merged settings for
New Features
- Custom Queries Support:
- Added the ability to include custom queries in network requests, enhancing flexibility for API interactions.
- Users can decide whether to use custom queries on a per-request basis by using the
attachCustomQueryoption.
Improvements
-
Enhanced
PlayxNetworkLoggerSettings:- Added options for attaching a logger in debug and release modes (
attachLoggerOnDebugandattachLoggerOnRelease).
- Added options for attaching a logger in debug and release modes (
-
Updated Dio Package:
- Upgraded Dio package to v5.7.0 for improved performance and features.
- Combined
-
0.1.225 Aug 2024Release notes
Open source →New Features
- Isolate-Based Data Processing:
- Integrated Dart's
Isolateto handle data processing in network responses, offloading CPU-intensive tasks to separate threads, which improves app performance, particularly in scenarios involving large datasets.
- Integrated Dart's
- Sentry Dio Integration:
- Added the Sentry Dio package to automatically capture and report errors in network requests to Sentry. This integration provides better monitoring and error tracking for network-related issues.
Improvements
- Updated
JsonMapperSignature:- The
JsonMapper<T>signature has been updated fromT Function(dynamic json)toFutureOr<T> Function(dynamic json)to support both synchronous and asynchronous JSON processing. This allows for more flexible and efficient handling of JSON data.
- The
Bug Fixes
- Fixed an issue where
getListandpostListmethods 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.
- Isolate-Based Data Processing:
-
0.1.108 Jul 2024 -
0.1.016 Apr 2024Release notes
Open source →Note: This version contains breaking changes.
- Update packages.
- Update
onUnauthorizedRequestReceivedcallback to takeResponseinstead ofvoidto be able to customize unauthorized error handling based on response. - Add
namefield for default error model.
-
0.0.920 Feb 2024Release notes
Open source →- Update packages.
- Add unauthorizedRequestCodes to be able to handle different unauthorized request status codes returned from the api and fire onUnauthorizedRequestReceived callback.
- Add successRequestCodes to be able to handle different success request status codes returned from the api and fire onUnauthorizedRequestReceived callback.
- Enhance printing non api error messages.
-
0.0.821 Dec 2023Release notes
Open source →- Update packages.
- Add
statusCodetoApiExceptionto be able to handle different error status codes returned from the api.
-
0.0.725 Sep 2023Release notes
Open source →- Update packages.
- Bug fix, causing
onUnauthorizedRequestReceivednot called when receiving unauthorized request on certain cases.
-
0.0.606 Sep 2023Release notes
Open source →- Add ability to not handle unauthorized requests on each request.
- [Breaking Change]! : Each Network Exception now takes errorMessage of type String instead of exceptionMessage
-
0.0.520 Jul 2023 -
0.0.420 Jul 2023Release notes
Open source →- Make
customHeadersto be of type function that return a map to be updated correctly.
- Make
-
0.0.320 Jul 2023 -
0.0.220 Jul 2023 -
0.0.119 Jul 2023