FLUTTER ECOSYSTEM

dio

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

Latest version
5.11.1
30-day downloads
4.4M
Likes
8.4K
Pub points
160

Package Overview

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

Overview

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
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add dio

Categories

Dependencies

Dependency list 7 items

Source repository

Related projects

Rankings