NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #531 most downloaded on pub.dev
retrofit.dart is an dio client generator using source_gen and inspired by Chopper and Retrofit.
Last release 1 months ago
13 Aug 2026
Release timing varies
gaps range from 9 days to 8 months
Most releases are documented
notes for 37 of 58 stable releases
3 versions withdrawn
withdrawn after publishing
8 years old
63 releases · first in 2019
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 #863
'>=8.0.0 <10.0.0' and update deprecated methods by @Carapacik in #863Full Changelog: retrofit-v4.9.1...retrofit-v4.9.2
One column per quarter.
Make Response parameter in ParseErrorLogger callback optional for backward compatibility
response parameter in logError is now a named optional parameter {Response? response}- Version bump to 4.9.0
Add global headers support to @RestApi annotation
Nothing published for this version
Add comments for each public methods
update to new tag format with prefix letter v
Updates minimum supported SDK version to Dart 3.8.
Nothing published for this version
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();
}
Nothing published for this version
Added @TypedExtras to pass extra options to dio requests using custom annotations.
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
Nothing published for this version
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
Nothing published for this version
- Update dio to ^5.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
- add compute support
compute support- rollback to dio - update dio to 4.0.1
Nothing published for this version
- 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
Your coding agent can read these notes before it upgrades. Set up the MCP server →