chopper_client_wrapper 1.0.0+1 copy "chopper_client_wrapper: ^1.0.0+1" to clipboard
chopper_client_wrapper: ^1.0.0+1 copied to clipboard

This package is a wrapper class that you can use to save time while setting up files for integrating apis. You just have to extend our class and follow the steps.

example/lib/main.dart

import 'dart:async';

import 'package:chopper/chopper.dart';
import 'package:chopper_client_wrapper/ChopperService/ChopperClientWrapper.dart';

void main() {}

class MyChopperClient extends ChopperClientWrapper {
  @override
  Map<Type, JsonConvertorFunction> get jsonToModelConvertorMap =>
      throw UnimplementedError();
  @override
  Map<Type, JsonConvertorFunction> get jsonToErrorModelConvertorMap =>
      throw UnimplementedError();
  @override
  String get baseUrl => 'https://myapi.com';
  @override
  List<ChopperService> get chopperServices => [
// List of Chopper services that you create for your application
      ];
  @override
  FutureOr<String> getToken() {
// Override this method to get the token that can be passed to the header
    return 'mytoken';
  }
}
4
likes
140
points
0
downloads

Publisher

verified publishertechypanther.com

Weekly Downloads

This package is a wrapper class that you can use to save time while setting up files for integrating apis. You just have to extend our class and follow the steps.

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

chopper, flutter

More

Packages that depend on chopper_client_wrapper