Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributemocktail

Dart mock library with null safety support and no manual mocks or code generation.

pub.devRemove
nock

HTTP requests mocking library for Dart and Flutter.

pub.devRemove
ScoresHealth84 (best)46
Maintenance61 (best)1
Quality100 (best)87
Popularity95 (best)62
Community80 (best)23
Compatibility100 (best)85
UsageDownloads (30 days)4M (best)53k
Likes1.2k (best)24
Pub points160 / 160 (best)130 / 160
GitHub stars702 (best)19
MaintenanceLatest release1.0.5, 7 months ago (best)1.2.3, 3 years ago
Major versions in 12 months00
Contributors21 (best)4
Publisherfelangel.devUnverified
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesNo
KindPure DartPure Dart
Code generationYesNo
Direct dependencies32 (best)
LicenseMITMIT
Setup effortLowLow
JudgementStrengths
  • No code generation or manual mocks required.
  • Familiar API inspired by mockito.
  • Supports argument matchers and fallback values.
  • 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
  • Cannot directly stub or verify extension methods.
  • Requires registering fallback values for custom types when using argument matchers.
  • Throws `NetConnectionNotAllowed` if a request is not explicitly mocked, which might require careful setup in complex tests.
WarningsNoneNone
mocktail vs nock: which Flutter package should you use? | pubscout