Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributehttp_mock_adapter

A simple to use mocking package for Dio intended to be used in tests.

pub.devRemove
nock

HTTP requests mocking library for Dart and Flutter.

pub.devRemove
ScoresHealth50 (best)46
Maintenance17 (best)1
Quality91 (best)87
Popularity86 (best)62
Community80 (best)23
Compatibility8585
UsageDownloads (30 days)411k (best)53k
Likes185 (best)24
Pub points140 / 160 (best)130 / 160
GitHub stars69 (best)19
MaintenanceLatest release0.6.1, 3 years ago (best)1.2.3, 3 years ago
Major versions in 12 months00
Contributors19 (best)4
Publisherlomsa.comUnverified
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyNoNo
KindPure DartPure Dart
Code generationNoNo
Direct dependencies42 (best)
LicenseMITMIT
Setup effortLowLow
JudgementStrengths
  • Simple to use for mocking Dio requests in tests
  • Supports declarative request-response mocking
  • Includes features like response delays and exact body checks
  • Supports multiple HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD).
  • Allows custom matchers for URLs, query parameters, and request bodies.
  • Supports persistent mocks and response delays.
Weaknesses
  • Strictly tied to the Dio package
  • Limited to testing use cases
  • Throws `NetConnectionNotAllowed` if a request is not explicitly mocked, which might require careful setup in complex tests.
WarningsNoneNone
http_mock_adapter vs nock: which Flutter package should you use? | pubscout