restio_retrofit 0.3.0 copy "restio_retrofit: ^0.3.0" to clipboard
restio_retrofit: ^0.3.0 copied to clipboard

discontinued

HTTP client generator for Restio inspired by Retrofit.

example/main.dart

import 'package:restio/restio.dart';
import 'package:restio_retrofit/restio_retrofit.dart' as retrofit;

part 'main.g.dart';

void main() async {
  final client = Restio();
  final api = HttpbinApi(client: client);

  final data = api.get();
  print(data);

  await client.close();
}

@retrofit.Api('https://httpbin.org')
abstract class HttpbinApi {
  factory HttpbinApi({Restio client, String baseUri}) = _HttpbinApi;

  @retrofit.Get('/get')
  Future<dynamic> get();
}
2
likes
40
points
65
downloads

Publisher

verified publishertiagohm.dev

Weekly Downloads

HTTP client generator for Restio inspired by Retrofit.

Repository (GitHub)

License

MIT (license)

Dependencies

analyzer, build, build_runner, code_builder, dart_style, meta, restio, source_gen

More

Packages that depend on restio_retrofit