PackageTrack
Sign in Get early access

api_network_kit

A batteries-included, no-codegen Dio wrapper for Flutter/Dart featuring typed parsing, resilient retry, automatic token refresh, caching, pagination, and WASM-ready checks.

1.2.1 84 downloads/mo #2418 most downloaded on pub.dev erdipakrana/api_network_kit

What this package is like to depend on

Last release 1 months ago

11 Jul 2026

Too new to tell

only 2 release windows

Nearly every release is documented

notes for 9 of 9 stable releases

Nothing withdrawn

no release was ever pulled

1 months old

9 releases · first in 2026

9 releases in the last 12 months

see the full history below

Release timeline

9 releases · Jul 2026 to Jul 2026
Release Pre-release

Releases

latest 9
  1. 1.2.1 11 Jul 2026
    Release notes
    • Enhanced Console Logging: Added visual card boundaries, request duration timing (ms), sensitive authorization/cookie masking, unrolled header list values, and payload truncation (10KB threshold) to prevent debugger console freeze.
    Open source →
  2. 1.2.0 08 Jul 2026
    Release notes
    • Enhanced Console Logging: Added visual card boundaries, request duration timing (ms), sensitive authorization/cookie masking, unrolled header list values, and payload truncation (10KB threshold) to prevent debugger console freeze.
    • New PATCH request helper: Added patch<T>() method supporting typed JSON response parsing, mirroring put<T>().
    • Multiple file upload: Added uploadFiles<T>() to allow uploading multiple files under the same multipart field name.
    • Improved Caching: Added stable cache keys with parameter normalization/sorting to avoid duplicate cache entries for the same query values in different orders.
    • Fail-Fast Validations: Added configuration validation checks for timeouts, retry base, and max-retry parameters to fail-fast if invalid values are passed to BaseApiClient.
    • Capped Exponential Backoff: Capped exponential retry delay base with a maximum of 30 seconds and introduced deterministic jitter to avoid thundering herd issues.
    • Refactored Requests: Consolidated common network mechanics into unified internal request handlers to eliminate duplicate code and optimize code maintainability.
    Open source →
  3. 1.1.2 06 Jul 2026
    Release notes
    • WASM Compatibility Fix: Replaced the external package:logger dependency with a custom, fully WASM-compatible console logger (ApiLogger) built directly into the package. This removes the dart:io dependency transitively introduced by the logger, resolving the WASM/Web compatibility issue.
    • cURL Request Logging: Implemented a cURL command generator in ApiInterceptor that prints a developer-friendly, ready-to-run cURL command for every HTTP request.
    • Updated Environment Constraints: Updated environment targets in pubspec.yaml to Dart >=3.4.0 <4.0.0 and Flutter >=3.22.0 to comply with modern WASM compilation pipelines.
    Open source →
  4. 1.1.1 02 Jul 2026
    Release notes
    • Shortened package description in pubspec.yaml to comply with pub.dev package guidelines.
    • Wrapped generic type references in backticks in doc comments to resolve HTML parsing warnings during static analysis.
    Open source →
  5. 1.1.0 02 Jul 2026
    Release notes

    Breaking changes (non-API)

    • Moved connectivity_plus and flutter_bloc from hard dependencies to dev_dependencies. The library no longer forces Flutter or native plugins on pure-Dart / Web / WASM consumers.
    • Moved the clean-architecture auth example from lib/features/auth/ into example/auth_feature/. It was never part of the published library API.

    New features

    • Automatic token refresh & retry (Priority 2): Added a TokenRefresher strategy and TokenRefreshInterceptor. On a 401, the interceptor calls the refresher, updates the stored token, and retries the original request once. Infinite loops are prevented via a per-request flag.
    • Configurable pagination (Priority 3): Added PaginationStrategy, PaginationConfig, OffsetPaginationStrategy, and CursorPaginationStrategy. getPaginated now accepts an optional paginationConfig / paginationStrategy. Defaults preserve the legacy hardcoded shape.
    • Cache abstraction & request deduplication (Priority 4): Added a CacheStore interface; ApiCache now implements it with ETag storage. Added RequestDeduplicator so concurrent identical GETs share a single in-flight request. ETag headers are now captured from responses.
    • Web/WASM-ready connectivity (Priority 5): Added a ConnectivityChecker interface with a NoOpConnectivityChecker default, so the package runs on pure-Dart and Web/WASM without native plugins. Flutter consumers can inject a connectivity_plus-backed checker.
    • Injectable logger (Priority 6): ApiLogger is now instance-based and injectable, with a static facade for backward compatibility.

    Bug fixes

    • Fixed broken String parser path (Priority 1): parseResponse now JSON-decodes String bodies with jsonDecode instead of casting a String to Map (which always threw).
    • Preserved error response bodies (Priority 1): All exceptions now carry statusCode, data, and errors populated from error.response?.data, making 422 field-validation errors reachable.
    • Fixed clearInterceptors() (Priority 6): It now preserves the internal auth and token-refresh interceptors instead of removing them and silently breaking auth.
    • Added exhaustive handling of DioExceptionType.transformTimeout, connectionError, and badCertificate in mapDioError.

    Tests

    • Added a real test suite using http_mock_adapter: response parsing, error mapping per status code (incl. 422 body preservation), cache hit/miss/expiry, token injection, clearInterceptors auth preservation, connectivity checks, pagination strategies, and request deduplication.

    Packaging

    • Added topics: [http, network, api-client, dio, rest] for pub.dev discoverability.
    • Bumped version to 1.1.0.
    Open source →
  6. 1.0.3 01 Jul 2026
    Release notes
    • Fixed Example tab detection on pub.dev by adding example/README.md.
    • Rewrote root README.md to properly document the package.
    Open source →
  7. 1.0.2 01 Jul 2026
    Release notes
    • Updated repository link to point to the correct GitHub repository.
    Open source →
  8. 1.0.1 01 Jul 2026
    Release notes
    • Upgraded dependencies to latest compatible versions.
    • Fixed all remaining code lints and static analysis warnings for maximum score.
    Open source →
  9. 1.0.0 01 Jul 2026
    Release notes
    • Initial release of api_network_kit.
    • Scalable Flutter package featuring a reusable API client (api_kit) for robust HTTP handling using Dio.
    • Robust error handling, retry mechanism, connectivity checks, logging, and response caching.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive