fluor 0.0.1-dev copy "fluor: ^0.0.1-dev" to clipboard
fluor: ^0.0.1-dev copied to clipboard

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

example/lib/example.dart

import 'dart:convert';
import 'package:retrofit/retrofit.dart';
import 'package:dio/dio.dart' hide Headers, Response;
import 'dart:io';
import 'package:http_parser/http_parser.dart' show MediaType;
import 'serializable.dart';

part 'example.retrofit.dart';

@RestApi(baseUrl: "https://5d42a6e2bc64f90014a56ca0.mockapi.io/api/v1/")
abstract class RestClient extends Client {
  static RestClient create(Dio dio, {String baseUrl}) =>
      _RestClient(dio, baseUrl: baseUrl);

  @GET("/tags")
  Future<List<String>> getTags();
}
0
likes
30
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

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

License

MIT (license)

Dependencies

dio, meta

More

Packages that depend on fluor