RxDart Adapter For Dartrofit

pub package

An Adapter for adapting rxdart types. Available types:

  • The Subject<T> and Subject<Response<T>> where T is the body type.

Example

import 'package:dartrofit/dartrofit.dart';
import 'package:rxdart/rxdart.dart' as rx;

part 'my_service.g.dart';

@Service()
abstract class MyService {
  MyService._();

  factory MyService(Dartrofit dartrofit) = _$MyService;

  @GET('book')
  rx.Subject<Response<ResponseBody>> getBook1(@Query('id') String id);

  @GET('book')
  rx.Subject<ResponseBody> getBook2(@Query('id') String id);
}

Download

dependencies:
  dartrofit_adapter_rx: ^1.1.0

Libraries

dartrofit_adapter_rx