Search packages, repositories and app categories

Package detailsv5.11.1

dio

A powerful HTTP networking package, supports Interceptors, Aborting and canceling a request, Custom adapters, Transformers, etc.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
5.2M
Likes
8.4K
Pub points
160

Install package

flutter pub add dio

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Dio is a powerful HTTP client for Dart and Flutter, designed for efficient and flexible network requests. It supports advanced features like interceptors for request/response modification, request cancellation, custom adapters, and transformers for data processing. Dio works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform apps. Its clean API and extensibility allow developers to handle complex networking scenarios with ease. Built with performance and developer experience in mind, Dio is widely used in production applications.

Use cases

  • Making REST API calls
  • Handling authentication tokens via interceptors
  • Canceling ongoing requests
  • Implementing retry logic
  • Transforming request/response data
  • Building offline-first applications

Key features

  • Interceptors for request/response manipulation
  • Request cancellation and aborting
  • Custom adapters for different environments
  • Data transformers for serialization/deserialization
  • Support for file uploads and downloads
  • Cross-platform compatibility

Suitable for

  • Mobile app development
  • Web applications
  • Desktop apps
  • API integration projects
  • Apps requiring advanced networking control
  • Teams needing robust HTTP handling

Considerations

  • Requires understanding of HTTP lifecycle
  • May need additional error handling setup
  • Not suitable for simple GET requests without customization
  • Limited built-in caching (external solutions recommended)
  • Platform-specific behavior may require testing

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

dio

Language: English | 简体中文

This is the base repo of the dio project. Please move to specific paths for project instructions.

Don't forget to add #dio topic to your published dio-related packages! See more: https://dart.dev/tools/pub/pubspec#topics

Versioning

Before you upgrade: Breaking changes might happen in major and minor versions of packages.
See the Migration Guide for the complete breaking changes list.

To know about our compatibility policy, see the Compatibility Policy doc.

All Packages

dio
Plugins
  • cookie_manager: link Pub
  • compatibility_layer: link Pub
  • http2_adapter: link Pub
  • native_dio_adapter: link Pub
  • web_adapter: link Pub
Examples
  • example: link
  • example_flutter_app: link

Copyright & License

The project and its underlying projects are originally authored by @wendux with the organization @flutterchina, started being maintained by Chinese Flutter User Group (@cfug) since 2023.

The project consents the MIT license.

Categories

Dependencies

Dependency list 7 items

Source repository

Projects using this package

Rankings