easy_mock_http 0.3.0 copy "easy_mock_http: ^0.3.0" to clipboard
easy_mock_http: ^0.3.0 copied to clipboard

Transport-agnostic HTTP mocking for Flutter VM tests. Intercepts dart:io's HttpClient via HttpOverrides, so Dio, http, or any client is mocked with zero injection — stub with when, assert with verify.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add easy_mock_http

With Flutter:

 $ flutter pub add easy_mock_http

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  easy_mock_http: ^0.3.0

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:easy_mock_http/easy_mock_http.dart';
0
likes
140
points
268
downloads

Documentation

API reference

Publisher

verified publisherahmedomar.com.ly

Weekly Downloads

Transport-agnostic HTTP mocking for Flutter VM tests. Intercepts dart:io's HttpClient via HttpOverrides, so Dio, http, or any client is mocked with zero injection — stub with when, assert with verify.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter_test

More

Packages that depend on easy_mock_http