talira

A Retrofit-inspired HTTP client generator for Dart and Flutter

open sourceMITfree

Chopper is an HTTP client generator for Dart and Flutter, inspired by Retrofit: you declare an API as an annotated abstract class, and chopper_generator (built on source_gen) writes the client code. It supports converters for JSON serialization (json_serializable, built_value) and interceptors for requests and responses. It's a Flutter Favorite package.

Problems it solves

  • generate a typed REST client in Flutter
  • a Retrofit-like HTTP client for Dart
  • add interceptors to API calls in a Flutter app

Features

  • generated HTTP clients from annotated classes
  • converters for json_serializable and built_value
  • request and response interceptors
  • Flutter Favorite

Alternatives

The same job

These do what Chopper does.

  1. dio HTTP client for Dart and Flutter with interceptors, FormData and cancellation
  2. retrofit.dart Type-safe HTTP client generator for Dart, built for dio

Compare Chopper with the top 3