Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributemock_exceptions

Allows throwing exceptions on specified method calls in fakes

pub.devRemove
mockito

A mock framework inspired by Mockito with APIs for Fakes, Mocks, behavior verification, and stubbing.

pub.devRemove
ScoresHealth5087 (best)
Maintenance080 (best)
Quality96 (best)87
Popularity5195 (best)
Community4180 (best)
Compatibility100100
UsageDownloads (30 days)372k2.8M (best)
Likes51.5k (best)
Pub points150 / 160 (best)130 / 160
GitHub stars1871 (best)
MaintenanceLatest release0.8.2, 4 years ago5.8.1, 4 months ago (best)
Major versions in 12 months00
Contributors1100+ (best)
Publisherwafrat.comdart.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationNoYes
Direct dependencies1 (best)10
LicenseMITAPACHE-2.0
Setup effortLowMedium
JudgementStrengths
  • Very small dependency footprint
  • Focused only on exception throwing, no extra features
  • Works with any fake implementation
  • Simple, readable API
  • Robust behavior verification and stubbing features.
  • Supports null safety and generates nice mocks to avoid runtime type exceptions.
Weaknesses
  • Only supports throwing, not stubbing return values
  • Requires manual insertion of maybeThrowException in each fake method
  • Not a full mocking solution
  • Requires running build_runner for code generation.
  • Has an awkward syntax requirement for naming arguments within argument matchers.
Warnings
  • Single maintainer
None
mock_exceptions vs mockito: which Flutter package should you use? | pubscout