# retrofit.dart

> Type-safe HTTP client generator for Dart, built for dio

Source: https://talira.ai/catalog/retrofit-dart-pnh327e2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / http clients](https://talira.ai/categories/libraries/http-clients), [languages / dart](https://talira.ai/categories/languages/dart)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Trevor Wang](https://talira.ai/orgs/trevor-wang.md)

retrofit.dart generates type-safe REST clients for Dart and Flutter on top of the [dio](https://talira.ai/catalog/dio-d8sdkjkv.md) HTTP client. You declare an abstract API class with annotations such as @RestApi and @GET, and its generator, which runs with build_runner and uses [source_gen](https://talira.ai/catalog/source-gen-mphgdz39.md), writes the implementation that sends the requests and converts the responses, with json_serializable as the default parser. It was inspired by Chopper and Square's Retrofit.

## Links

- GitHub: https://github.com/trevorwang/retrofit.dart
- Docs: https://mings.in/retrofit.dart/

## Problems it solves

- generate a type-safe REST API client in Flutter
- stop writing dio request boilerplate by hand in Dart
- Retrofit-style HTTP client for Dart

## Features

- annotations such as @RestApi, @GET and @POST to declare an API
- code generation with build_runner and source_gen
- built on the dio HTTP client
- pluggable response parsers, with json_serializable by default

## Trust

Overall: 0.51 out of 1.
Signals: maintenance 0.65, adoption 0.61, momentum 0.34, community 0.81, backing 0.30, extensibility 0.00.

- last commit 15 days ago
- 8 commits in the last 90 days
- latest release v10.3.3 29 days ago
- 1.2k GitHub stars
- 106 contributors
- backed by Trevor Wang

## Related

- Works with [dio](https://talira.ai/catalog/dio-d8sdkjkv.md)

## Alternatives

- [Chopper](https://talira.ai/catalog/chopper-gqkw9r8p.md): A Retrofit-inspired HTTP client generator for Dart and Flutter
- [http2 (Dart)](https://talira.ai/catalog/http2-dart-wz40w14x.md): HTTP/2 implementation for Dart, with a pooled, multiplexing http.Client
- [dio](https://talira.ai/catalog/dio-d8sdkjkv.md): HTTP client for Dart and Flutter with interceptors, FormData and cancellation
- [dio_cache_interceptor](https://talira.ai/catalog/dio-cache-interceptor-gcfrpx8g.md): HTTP cache interceptor for Dart's dio client, with pluggable stores

## Sources

[^1]: https://github.com/trevorwang/retrofit.dart/blob/master/README.md (checked 28 Nov 2026)
[^2]: https://github.com/trevorwang/retrofit.dart/blob/master/LICENSE (checked 28 Nov 2026)
