NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #530 most downloaded on pub.dev
retrofit.dart is an dio client generator using source_gen and inspired by Chopper and Retrofit.
Latest stable
4.10.0
Last release 3 months ago
13 Aug 2026
Release timing varies
gaps range from 9 days to 8 months
Most releases are documented
notes for 42 of 58 stable releases
3 versions withdrawn
withdrawn after publishing
8 years old
63 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
fix(generator): detect generated and abstract toJson on Freezed models (
fix(generator): detect generated and abstract toJson on Freezed models (
#927)
lookUpMethod misses toJson when the Freezed part file is hidden from
retrofit_generator. Treat a source fromJson factory as evidence that
json_serializable generated toJson, and still look up mixin/abstract
methods when they are visible.
Fixes #914
Support analyzer '>=8.0.0 <10.0.0' and update deprecated methods by @Carapacik in https://github.com/trevorwang/retrofit.dart/pull/863
'>=8.0.0 <10.0.0' and update deprecated methods by @Carapacik in https://github.com/trevorwang/retrofit.dart/pull/863Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/retrofit-v4.9.1...retrofit-v4.9.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Make Response parameter in ParseErrorLogger callback optional for backward compatibility
response parameter in logError is now a named optional parameter {Response? response}Bump version and update retrofit dependency by @trevorwang in https://github.com/trevorwang/retrofit.dart/pull/838
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/retrofit-v4.8.0...retrofit-v4.9.0
Stop using deprecated TypeChecker.fromRuntime by @Carapacik in https://github.com/trevorwang/retrofit.dart/pull/786
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/retrofit-v4.7.2...retrofit-v4.8.0
Nothing published for this version
Add // dart format off and // dart format on comments to *.g.dart file by @koji-1009 in https://github.com/trevorwang/retrofit.dart/pull/782
// dart format off and // dart format on comments to *.g.dart file by @koji-1009 in https://github.com/trevorwang/retrofit.dart/pull/782Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/retrofit-v4.7.1...retrofit-v4.7.2
update tag format by @trevorwang in https://github.com/trevorwang/retrofit.dart/pull/778
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/10.0.1...retrofit-v4.7.1
Updates minimum supported SDK version to Dart 3.8.
move enum value resolve from .name to .toString by @vasilich6107 in https://github.com/trevorwang/retrofit.dart/pull/768
build by @Carapacik in https://github.com/trevorwang/retrofit.dart/pull/769Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/9.3.0...retrofit-4.6.0
Added @BodyExtra annotation to support adding individual fields to request body, enhancing flexibility and extensibility.
Added @BodyExtra annotation to support adding individual fields to request body, enhancing flexibility and extensibility.
Example :
@http.POST('/path/')
Future<String> updateValue(@BodyExtra('id') int id, @BodyExtra('value') String value);
The request body will be:
{"id": 123, "value": "some value"}
Introduced CallAdapters, This feature allows adaptation of a Call with return type R into the type of T. e.g. Future to Future >
Introduced CallAdapters, This feature allows adaptation of a Call with return type R into the type of T. e.g. Future<User> to Future<Result<User>>
Code Example:
class MyCallAdapter<T> extends CallAdapter<Future<T>, Future<Either<ApiError, T>>> {
@override
Future<Either<ApiError, T>> adapt(Future<T> Function() call) async {
try {
final response = await call();
return Either.right(response);
}
catch (e) {
return Either.left(ApiError(e))
}
}
}
@RestApi()
abstract class RestClient {
factory RestClient(Dio dio, {String? baseUrl}) = _RestClient;
@UseCallAdapter(MyCallAdapter)
@GET('/')
Future<User> getTasks();
}
Format code, update examples, remove tuple by @Carapacik in https://github.com/trevorwang/retrofit.dart/pull/707
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/retrofit-4.4.0...retrofit-4.4.1
Feat: Enable passing in Extras using Custom Annotations by @farmery in https://github.com/trevorwang/retrofit.dart/pull/706
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/retrofit-4.3.0...retrofit-4.4.0
Added @TypedExtras to pass extra options to dio requests using custom annotations.
Example :
@TypedExtrasSubClass(
id: 'abcd',
count: 5,
shouldProceed: true,
)
@http.POST('/path/')
Future<String> myMethod(@Extras() Map<String, dynamic> extras);
- Required Dart 2.19 - Update README
remove autoCastResponse annotation
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/8.1.2...retrofit-4.2.0
Added @Extras to pass extra options to dio requests, response, transformer and interceptors.
Added @Extras to pass extra options to dio requests, response, transformer and interceptors.
Example :
@http.POST('/path/')
Future<String> myMethod(@Extras() Map<String, dynamic> extras);
Nothing published for this version
Nothing published for this version
Fix bug deserialize List by @hnvn in https://github.com/trevorwang/retrofit.dart/pull/449
newRequestOptions argument to Object. by @zaralockheart in https://github.com/trevorwang/retrofit.dart/pull/451Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/4.0.0...4.0.1
[generator] Adds a ignore_for_file rule to suppress the analyzer warnings for the generated files. by @omarsahl in https://github.com/trevorwang/retro
ignore_for_file rule to suppress the analyzer warnings for the generated files. by @omarsahl in https://github.com/trevorwang/retrofit.dart/pull/443Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/3.0.1...4.0.0
Nothing published for this version
remove autoCastResponse annotation
add recommended dart lints to project
Nothing published for this version
- add multipart mime type
- fix pub warning
[wip] Define a new parser annotation for using the Flutter compute function by @via-guy in https://github.com/trevorwang/retrofit.dart/pull/407
FlutterCompute documentation + v3.0.0 by @via-guy in https://github.com/trevorwang/retrofit.dart/pull/412Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/2.2.0...3.0.0
Revert "Replace dio by dio_http" by @trevorwang in https://github.com/trevorwang/retrofit.dart/pull/405
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/2.1.0...2.2.0
nullable list of int was added to generator by @xoltawn in https://github.com/trevorwang/retrofit.dart/pull/402
Full Changelog: https://github.com/trevorwang/retrofit.dart/compare/2.0.1+2...2.1.0
- add CacheControl
Nothing published for this version
- Nullsafety support
Add dart json mapper deserialize support
Nothing published for this version
[BREAKING CHANGE] Change Part's params to named parameters from optional ones.
Part's params to named parameters from optional ones.Add contentType to Part annotation
contentType to Part annotationAdd custom options support to each request
Nothing published for this version
Nothing published for this version
Bumped retrofit's SDK requirement to >=2.6.0
Add HttpReponse to handle original response
HttpReponse to handle original response[BREAKING CHANGE] Add new Part annotation to send multipart/form-data request. Field will not be used in the future, please use Part instead.
Part annotation to send multipart/form-data request. Field will not be used in the future, please use Part instead.Nothing published for this version
- Add dio response type support
Nothing published for this version
- Support dio 3.0
Added autoCastResponse option to RestApi and all Method annotations (default : true)
Added autoCastResponse option to RestApi and all Method annotations (default : true)
Added auto_cast_response to builder options.
Users can specify this in build.yaml as global default
targets:
$default:
sources: ["lib/**"]
builders:
retrofit_generator|retrofit:
enabled: true
options:
auto_cast_response: true
add CancelToken, SendProgress, and ReceiveProgress
Nothing published for this version
[BREAKING CHANGE] only works dart 2.2.2 and above
Fixed analysis report use retrofit.dart instead of http.dart and dio.dart to import classes
retrofit.dart instead of http.dart and dio.dart to import classes- Updated docs and sample code
Nothing published for this version
Nothing published for this version
Added optional parameter fileName in @Field annotation for custom file name
fileName in @Field annotation for custom file name- add example
Added @Extra to pass extra options to dio requests, response, transformer and interceptors.
Added @Extra to pass extra options to dio requests, response, transformer and interceptors.
Example :
@http.POST('/path/')
@dio.Extra({'my_key':'my_value'})
Future<String> myMethod();
Fixed general dart style and code conventions
Automatically null check with ArgumentError.checkNotNull for required parameters
Now SuperClasses can use forwarding/redirecting constructors instead of static instance() method
Example :
@RestApi(baseUrl: "https://httpbin.org/")
abstract class RestClient {
/// Forwarding constructor
factory RestClient([Dio dio]) = _RestClient;
}
Nothing published for this version
Nothing published for this version
One column per quarter.