flocon_dio
Dio interceptor that sends your HTTP calls to the Flocon desktop debugger, and applies the mocks and the bad network set from the desktop.
Installation
There is no release on pub.dev yet, depend on the repository:
dependencies:
flocon:
git:
url: https://github.com/openflocon/FloconFlutter.git
path: packages/flocon
flocon_dio:
git:
url: https://github.com/openflocon/FloconFlutter.git
path: packages/flocon_dio
Usage
import 'package:flocon_dio/flocon_dio.dart';
final dio = Dio(BaseOptions(baseUrl: baseUrl)).withFlocon(); // after your own interceptors
The options (which calls are sent, which responses are images) are given once, to the network plugin:
await startFlocon((flocon) => flocon
..install(FloconNetwork(isImage: (request, _) => request.url.host == 'images.example.com')));
See the full documentation and the example.
License
MIT, see LICENSE.
Libraries
- flocon_dio
- Dio interceptor for Flocon: sends every HTTP call to the Flocon desktop app.