NetLens for Chopper
Connects NetLens, the in-app HTTP inspector for Flutter, to Chopper.
Install
dependencies:
netlens: ^1.1.0
netlens_chopper: ^1.1.0
Use
import 'package:chopper/chopper.dart';
import 'package:netlens/netlens.dart';
import 'package:netlens_chopper/netlens_chopper.dart';
final netLens = NetLens();
final adapter = NetLensChopperAdapter();
netLens.addAdapter(adapter);
final chopper = ChopperClient(interceptors: [adapter]);
Mocks
To replay mocks recorded by NetLens, pass NetLensHttpMockClient from
netlens_http as the client of Chopper:
final chopper = ChopperClient(
client: NetLensHttpMockClient(resolver: netLens.mocks),
interceptors: [adapter],
);
See Mocks.
Documentation
You can find the documentation here.
Credits
NetLens is a fork of Alice by Jakub Homlala and its contributors, licensed under the Apache License 2.0.
Libraries
- netlens_chopper
- Connects NetLens to Chopper.
- netlens_chopper_adapter