api_sentinel 1.0.1 copy "api_sentinel: ^1.0.1" to clipboard
api_sentinel: ^1.0.1 copied to clipboard

A lightweight Dio-powered API service for Flutter that automatically logs requests

Changelog #

1.0.1 #

Fix importing issue

1.0.0 #

Add optional network monitoring integration to API service and make error handling more flexible.

New Features:

Introduce a pluggable networkMonitoringFunction callback in ApiService to capture details of network-related exceptions. Add NetworkMonitoringParams model to standardize data passed to network monitoring integrations. Enhancements:

Allow ApiService request success handlers to be async for more flexible post-response processing. Extend handleErrorMessage to accept an optional error key override when parsing API error responses.

0.0.8 #

  • Add needToLogRequests for adding request to the DebugLogController

0.0.7 #

  • Added support for Unauthorized Flow handling

0.0.6 #

  • Change CookieJar into nullable instead of late

0.0.5 #

  • Added cookie management support in API service using persistent storage for session handling.
  • Introduced configurable logging via needToShowLog flag in the init method in ApiService.

0.0.4 #

  • Add header option to api service

0.0.3 #

  • Add Filter for log pages
  • Add attach to side draggable and expandable overlay
  • Not showing overlay in debug page

0.0.2 #

Format code for pub.dev

0.0.1 #

Initial release of the package

  • Introduced a centralized API service with:

    • Unified GET, POST, PUT, PATCH, and DELETE request handling
    • Built-in error catching (DioException & general exceptions)
    • Custom success and failure callbacks
  • Added a floating draggable debug overlay for real-time API inspection

    • View logs, request bodies, and responses directly in-app
    • Includes JSON tree view and color-highlighted JSON viewer
    • Expandable to a full-screen log viewer
  • Added log filtering (by method, status, or keyword)

  • Example project demonstrating integration with a public REST API

3
likes
150
points
496
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight Dio-powered API service for Flutter that automatically logs requests

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

cookie_jar, dio, dio_cookie_manager, dio_web_adapter, flutter, get, path_provider

More

Packages that depend on api_sentinel