NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev, #1041 most downloaded on pub.dev
A framework for checking values against expectations and building custom expectations.
Latest stable
0.4.0
Last release 3 days ago
19 Nov 2026
Release timing varies
gaps range from 1 weeks to 1.4 years
Nearly every release is documented
notes for 8 of 8 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
8 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
Replace the typedef Condition and AsyncCondition function type callback arguments with a Condition class which has check , softCheck , and describe me
typedef Condition and AsyncCondition function type callbackCondition class which has check, softCheck, anddescribe methods. Use the static it method in place of function(it) => it.someCheck() becomes .it()..someCheck(). MostCondition.it<SomeType>()..someCheck().describe, describeAsync, softCheck, and softCheckAsyncCondition.has so the name comes first:has((v) => v.property, 'property') becomeshas('property', (v) => v.property). A data driven fix is included, sodart fix --apply will update most call sites. Call sites where thedynamic produce no analysis error anddoesNotCompleteisDoneisEmptyisFalseisFiniteisInfiniteisNaNisNegativeisNotEmptyisNotFiniteisNotInfiniteisNotNaNisNotNegativeisNullisTrueCheckFailure and FailureDetail.Context.nest to accept an optional named nestedCondition argumentSubject.isA, Subject.isNotNull, Subject.throws (sync), andSubject.returnsNormally to accept an optional Condition to applycheck(foo).isA<int>(.it()..isGreaterThan(0));Subject.completes, Subject.throws (async), StreamChecks.emits,StreamChecks.emitsError to return Future<Subject> in addition toCondition. For example(await check(foo).completes()).equals(42);FutureSubjectExtension.which to allow chaining expectations on aFuture<Subject>.MapChecks.isNotEmpty to say that the mapis empty, instead of incorrectly repeating is not empty.pairwiseMatches to indent the nested detailequalsIgnoringWhitespace to report the valueWhich: clause ofisA, IterableChecks.any, MapChecks.containsKeyThat, andMapChecks.containsValueThat.not.prints() check extensions on Subject<void Function()> andSubject<Future<void> Function()> to check expectations against captured.throws<StateError>().has('message', (e) => e.message).equals('foo') readsthrows an error of type StateError that has message: 'foo' instead ofthrows has message: 'foo', and chained has calls read ashas value that has field: 'foo' instead of has value: has field: 'foo'.Condition.describe, matching the format used for failure messages. For.it()..length.equals(1) describes as has length: <1> instead ofhas length that: followed by equals <1> on an indented line.has length that: followedequals <3> instead of has length: <3>.IterableChecks.any,IterableChecks.every, MapChecks.containsKeyThat, andMapChecks.containsValueThat to a single line when the condition describesExpected: an iterable containing a value that is greater than <7>.IterableChecks.any, IterableChecks.every,MapChecks.containsKeyThat, and MapChecks.containsValueThat in a singlecontains a value that is greater than <7>.IterableChecks.every asonly has elements where each instead of only has values that, foronly has elements where each is less than <10>, so that it readsCondition.softCheck when a precondition suchisA<T>() is rejected and further expectations follow it. The lastIterableChecks.every.IterableChecks.every, andcompletes was waiting forIterableChecks.every and for ConditionIterableChecks.deepEquals to keep the nested property for theActual: has field: 'foo' instead ofActual: 'foo'. deepEquals now uses the same format as every, withWhich: in place of which.CheckFailure.describeNested to describe a failure from soft checkingwhich of another Rejection, in the same formatcheck.check for the conditions thatStreamChecks.inOrder, StreamChecks.anyOf, andIterableChecks.pairwiseMatches. Each failure now has an Actual: line,inOrder and anyOf previously omitted when the condition failedinOrder and anyOf no longerExpected: description of the condition.Actual: line of failures fromStreamChecks.emits, emitsError, emitsThrough, neverEmits, andisDone, instead of a stream. For example emitsThrough reportsActual: a stream that closed after emitting ['a', 'b', 'c'] andneverEmits reports the values up to and including the matching one. Up toStreamChecks.emitsError when the stream emitsclosed without emitting an error.package:meta ^1.17.0.Iterable.last member of the iterable for IterableChecks.lastYour coding agent can read these notes before it upgrades. Set up the MCP server →
Bump test dev dependency constraint.
test dev dependency constraint.isNotA<R>() check extension as a convenience in place ofnot((it) => it.isA<R>()).mayEmit ormayEmitMultiple. Note that extensions using nestAsync should synchronouslytoString().@awaitNotRequired since tests are safelyDirectly compare keys across actual and expected Map instances when checking deep collection equality and all the keys can be directly compared for eq
Map instances when
checking deep collection equality and all the keys can be directly compared
for equality. This maintains the path into a nested collection for typical
cases of checking for equality against a purely value collection.containsMatchingInOrder and containsEqualInOrder to replace the
combined functionality in containsInOrder.pairwiseComparesTo with pairwiseMatches.TypeError when comparing large Map instancesRemove the Condition class and the it() utility. Replace calls to (it()..someExpectation()) with ((it) => it.someExpectation()).
Condition class and the it() utility. Replace calls to
(it()..someExpectation()) with ((it) => it.someExpectation()).Return the first failure from softCheck and softCheckAsync as documented, instead of the last failure when there are multiple failures.
softCheck and softCheckAsync as
documented, instead of the last failure when there are multiple failures.because usage and mention the "reason" name in the migration
guide.ComparableChecks with comparison expectations for subject types that
implement Comparable.Add a link to file issues with feedback in the README.
nest and nestAsync take Iterable Function() arguments for label instead of String.
checkThat renamed to check.nest and nestAsync take Iterable<String> Function() arguments for
label instead of String.completes, throws, emits, and
emitsError no longer return a Future<Subject>. Instead they take an
optional Condition argument which can check expectations that would
have been checked on the returned subject.nestAsync no longer returns a Subject, callers must pass the
followup Condition to the nullable argument.which extension on Future<Subject>.matches renamed to matchesPattern and now accepts a Pattern
argument, instead of limiting to RegExp.- Initial release.
One column per quarter.