# trevorwang/retrofit.dart

retrofit.dart is an dio client generator using source_gen and inspired by Chopper and Retrofit.

Repository: https://github.com/trevorwang/retrofit.dart
Canonical: https://ross.abutalabs.com/products/retrofitdart
Homepage: http://mings.in/retrofit.dart/
Language: Dart
License: MIT
License Family: permissive
Topics: retrofit, dart, dio, http, source-gen, build-runner, chopper
Last push: 2026-08-19T06:51:18+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 98, longevity 100
- inputs: {"age_days": 2707, "days_push": 14, "days_rel": 14, "gap_med": 5.5, "n_releases_24m": 49}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1184, forks 290 (observed 2026-08-28T04:03:54.645336+00:00)

## What it is
retrofit.dart is a Dart code generator that creates type-safe HTTP API clients for the dio package using annotations and source_gen, inspired by Retrofit and Chopper. Developers define abstract REST API classes and build_runner generates the implementation code with JSON type conversion.

## Use cases
- generate type-safe HTTP clients in Dart
- declarative REST API definitions with annotations
- auto-convert JSON responses to Dart objects
- reduce boilerplate in Flutter network layers
- define API endpoints as abstract classes
- integrate dio with code generation via build_runner

## When to choose
- you're building a Flutter or Dart app that consumes REST APIs
- you want Retrofit-style declarative API clients in Dart
- you want automatic JSON serialization wired into your HTTP layer
- you want to eliminate repetitive dio client code

## When to avoid
- you don't use dio as your HTTP client
- you prefer writing HTTP calls manually without code generation
- your project avoids build_runner/source_gen build steps
- you need a client for non-REST protocols

## Facets
- artifact type: library
- maturity: active
- function: http-client, api-documentation, developer-tools
- domain: web-development, mobile-development, developer-tools, apis
- platform: cross-platform
- tags: code-generation, flutter

## Member repositories
- trevorwang/retrofit.dart (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:54.645336+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:24:29.771093+00:00, confidence not recorded.
  - readme: https://github.com/trevorwang/retrofit.dart (fetched 2026-08-28T04:03:54.645336+00:00, sha a4c18e324cb6)
  - homepage: http://mings.in/retrofit.dart/ (fetched 2026-08-29T12:31:20.015631+00:00, sha 60fabaa92bed)
- Data as of 2026-08-30T08:39:29.467469+00:00.
