http_mock_adapter 0.6.1 copy "http_mock_adapter: ^0.6.1" to clipboard
http_mock_adapter: ^0.6.1 copied to clipboard

A simple to use mocking package for Dio intended to be used in tests. It provides various types and methods to declaratively mock request-response communication.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add http_mock_adapter
copied to clipboard

With Flutter:

 $ flutter pub add http_mock_adapter
copied to clipboard

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

dependencies:
  http_mock_adapter: ^0.6.1
copied to clipboard

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:http_mock_adapter/http_mock_adapter.dart';
copied to clipboard
169
likes
150
points
180k
downloads

Publisher

verified publisherlomsa.com

Weekly Downloads

2024.09.15 - 2025.03.30

A simple to use mocking package for Dio intended to be used in tests. It provides various types and methods to declaratively mock request-response communication.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

collection, dio, http_parser, logger

More

Packages that depend on http_mock_adapter