Search packages, repositories and app categories

Package detailsv8.7.1

chopper

Chopper is an http client generator using source_gen, inspired by Retrofit

AndroidiOSWebmacOSWindowsLinux
30-day downloads
151K
Likes
917
Pub points
160

Install package

flutter pub add chopper

Package Overview

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

Chopper is a powerful HTTP client generator for Dart and Flutter, built on source_gen. Inspired by Retrofit, it simplifies API integration by generating type-safe clients from annotations. Developers define endpoints using simple decorators, and Chopper automatically generates the corresponding client code, reducing boilerplate and improving maintainability. It supports serialization, interceptors, and modular design, making it ideal for structured RESTful services across multiple platforms.

Use cases

  • Building type-safe REST APIs in Flutter apps
  • Automating HTTP client generation from annotations
  • Integrating with JSON serialization
  • Creating reusable and maintainable network layers
  • Supporting multi-platform applications

Key features

  • Annotation-based API definition
  • Automatic client code generation via source_gen
  • Built-in support for JSON serialization
  • Interceptor system for request/response manipulation
  • Modular and extensible architecture

Suitable for

  • Flutter developers seeking clean HTTP client patterns
  • Teams using REST APIs with consistent data models
  • Projects requiring reduced network-related boilerplate
  • Developers familiar with Retrofit or similar libraries
  • Applications targeting Android, iOS, Web, macOS, Windows, and Linux

Considerations

  • Requires understanding of source_gen and build runners
  • Initial setup involves build configuration
  • Limited to REST-style APIs (not GraphQL)
  • May increase build time due to code generation
  • Depends on external serialization libraries like json_annotation

Original README

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

Chopper

All Contributors

pub package Dart CI codecov

Chopper is an http client generator for Dart and Flutter using source_gen and inspired by Retrofit.

Documentation

Installation

Please refer to the installation guide at pub.dev or in the Getting started document.

Examples

Issue Tracker

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Hadrien Lejard

💻 👀 ⚠️ 📖

István Juhos

💻 👀 ⚠️ 📖

Klemen Tusar

💻 👀 ⚠️ 📖

Ivan Terekhin

💻 👀 ⚠️ 📖

Job Guldemeester

💻 👀 ⚠️ 📖

Eugeny Sampir

💻

Uladzimir Paliukhovich

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Categories

Dependencies

Dependency list 5 items

Source repository

Projects using this package

Rankings