fluor 0.0.1-dev
fluor: ^0.0.1-dev

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
60
pub points
19%
popularity

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

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

trevor.wang@qq.com

License

MIT (LICENSE)

Dependencies

dio, meta

More

Packages that depend on fluor