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
110
pub points
16%
popularity

Publisher

verified publishertechypanther.com

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.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

chopper, flutter

More

Packages that depend on chopper_client_wrapper