NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1695 most downloaded on pub.dev
Dart async extensions, to help usage of Future, FutureOr and async methods. Also allows performance improvements when using sync and async code.
Last release 6 months ago
25 Mar 2026
Release timing varies
gaps range from 1 weeks to 9 months
Nearly every release is documented
notes for 38 of 38 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
38 releases · first in 2021
Added method when that returns this if a condition evaluates to true , otherwise null .
ObjectExtension<T>:
when that returns this if a condition evaluates to true, otherwise null.FutureOrExtension<T>:
whenAsync as an async-aware version of when, returning this or null based on a condition evaluation.Added callsLength getter to return the number of cached computations.
ComputeOnceCache:
callsLength getter to return the number of cached computations.ComputeOnceCachedIDs:
compare field non-nullable and always initialized with a comparator (defaulting to _Comparer._defaultCompare).compare.ComputeIDs constructor.computeIDs and getByIDs methods to correctly merge and order results by IDs.ComputeIDs:
compare field non-nullable and always initialized.checkIDsSorted method to verify internal ID ordering.intersection method to preserve input order of IDs.getValuesByIndexes to handle cases where values list length differs from IDs length and ensure sorted output.equalsIDs to always use comparator.ListIdValuePairExtension:
binarySearchIndex and binarySearch methods to require non-null comparator argument._Comparer:
binarySearchIndex to require non-null comparator argument.One column per quarter.
Renamed ComputeOnceCall to ComputeCall .
ComputeOnce:
ComputeOnceCall to ComputeCall.PosComputeCall callback invoked after computation completes, receiving success or error results.posCompute field to invoke post-computation callback.resolve and resolveAsync to apply posCompute on success or error.TimedComputeOnce:
posCompute callback.Added ComputeOnceCache:
TimedComputeOnce instances by key.get method to retrieve or create cached computations.Added ComputeOnceCachedIDs:
ComputeOnceCache for batched computations by ID sets.getByIDs to get computations for subsets of IDs.computeIDs to compute and merge results for requested IDs, preserving order.Added ComputeIDs:
Added extensions:
IterableComputeOnceExtension for resolving multiple ComputeOnce instances.MapComputeIDsExtension for resolving maps of TimedComputeOnce keyed by ComputeIDs.ListIdValuePairExtension for binary searching (ID, value) pairs sorted by ID.Typedefs:
ComputeCallIDs for batched ID computations.ComputeIDCompare and ComputeIDHash for ID comparison and hashing.FunctionArgs0Extension , FunctionArgs1Extension , FunctionArgs2Extension :
FunctionArgs0Extension, FunctionArgs1Extension, FunctionArgs2Extension:
tryCall: updated to catch errors from synchronous or asynchronous results and apply onError via Future.catchError if the result is a Future.ComputeOnce<V>:
_resolveCall to widen callbacks returning Future<Never> to FutureOr<V>._call with _resolveCall to fix Future<Never> callbacks.isResolving getter to indicate if computation is in progress.resolve method:
throwError, onError, and onErrorValue to control error handling behavior.onCompute callback on completion with value or error.resolveAsync method:
throwError, onError, and onErrorValue for asynchronous error handling.onCompute callback on completion.onCompute callback method invoked once computation completes.className getter and improved toString to reflect current state (resolving, resolved with value, or error).Added TimedComputeOnce<V> subclass:
resolvedAt timestamp and elapsedTime since resolution.onCompute to set resolution time.className for identification.Added method whenResolved to invoke a callback on future resolution (success or error) and map the outcome to a new result without automatically rethr
FutureExtension:
whenResolved to invoke a callback on future resolution (success or error) and map the outcome to a new result without automatically rethrowing errors.ComputeOnce:
whenComplete to register a callback executed when resolution completes, regardless of success or failure.whenResolved to invoke a callback on resolution (success or error) and map the outcome to a new result, delegating to resolveAsync and Future.whenResolved.Added typedef ComputeOnceCall<V> for the computation callback signature.
ComputeOnce:
ComputeOnceCall<V> for the computation callback signature._call field type to nullable ComputeOnceCall<V>? and clear it after computation completes to release references and prevent re-invocation.ComputeOnce:
ComputeOnceCall<V> for the computation callback signature._call field type to nullable ComputeOnceCall<V>? and clear it after computation completes to release references and prevent re-invocation.Added export of src/async_extension_compute_once.dart to library.
async_extension:
src/async_extension_compute_once.dart to library.ComputeOnce.Dependencies:
test dependency from ^1.26.0 to ^1.26.3.coverage dependency from ^1.13.1 to ^1.15.0.Update GitHub Actions to use checkout@v6 and codecov-action@v5.
New FunctionArgs0Extension , FunctionArgs1Extension , FunctionArgs2Extension :
New FunctionArgs0Extension, FunctionArgs1Extension, FunctionArgs2Extension:
tryCall, tryCallThen and asFutureOr.test: ^1.26.0
dependency_validator: ^4.1.3
coverage: ^1.13.1
Added Function extension: retry and retryWith .
Function extension: retry and retryWith.Improved asyncTry documentation.
Added asyncRetry.
Improved asyncTry documentation.
lints: ^4.0.0
test: ^1.25.13
dependency_validator: ^4.1.2
coverage: ^1.11.1
New IterableMapEntryFutureValueExtension:
New IterableMapEntryFutureValueExtension:
resolveAllValues.New IterableMapEntryFutureKeyExtension:
resolveAllKeys.New IterableMapEntryFutureExtension:
resolveAllEntries.- New IterableAsyncExtension: - Added forEachAsync.
IterableAsyncExtension:
forEachAsync.Added completeSafe, completeErrorSafe.
CompleterExtension:
completeSafe, completeErrorSafe.onErrorReturn: added optional parameter onError.
onErrorReturn: added optional parameter onError.nullOnError: added optional parameters onError and onErrorOrNull.New AsyncExtensionErrorLogger and defaultAsyncExtensionErrorLogger:
New AsyncExtensionErrorLogger and defaultAsyncExtensionErrorLogger:
New FutureOnErrorExtension:
logErroronErrorReturnnullOnErrorFutureNonNullOnErrorExtension:
onCompleteFutureNullableOnErrorExtension:
onCompleteonCompleteNotNulllints: ^3.0.0
IterableFutureOrNullableExtension:
IterableFutureOrNullableExtension:
whereFutureNullable, selectFuturesNullable: return Future<T?> for consistency with "Nullable" suffix.waitFuturesNullable: return FutureOr<List<T?>> for consistency with "Nullable" suffix.New extension IterableFutureOrNullableExtension on Iterable ?>:
New extension IterableFutureOrNullableExtension<T> on Iterable<FutureOr<T>?>:
whereFutureNullable, selectFuturesNullable, asFuturesNullable and waitFuturesNullable.test: ^1.25.2
dependency_validator: ^3.2.3
coverage: ^1.7.2
New ExpandoFutureExtension and ExpandoFutureOrExtension:
ExpandoFutureExtension and ExpandoFutureOrExtension:
putIfAbsentAsyncNew FutureOrIterableNullableExtension and FutureIterableNullableExtension.
FutureOrIterableNullableExtension and FutureIterableNullableExtension.New FutureNullableExtension and FutureOrNullableExtension:
FutureNullableExtension and FutureOrNullableExtension:
orElseAsync and orElseGeAsync.FutureOrIterableExtension and FutureIterableExtension.
FutureOrIterableExtension and FutureIterableExtension.
Async to avoid extension overwrite issues.New FutureOrIterableExtension and FutureIterableExtension.
FutureOrIterableExtension and FutureIterableExtension.- sdk: '>=3.0.0 <4.0.0' - lints: ^2.1.1 - test: ^1.24.4
resolveMapped, resolveAllValuesNullable.
Optimize:
resolveMapped, resolveAllValuesNullable.resolveAllValues, resolveAllValuesNullable, resolveAllKeys, resolveAllEntries.sdk: '>=2.18.0 <4.0.0'
test: ^1.24.3
- Fix GitHub CI badge. - sdk: '>=2.18.0 <3.0.0' - lints: ^2.0.1 - test: ^1.23.0 - coverage: ^1.6.3
Fix issue when onError returns a Future with a type different from the main function.
asyncTry:
onError returns a Future with a type different from the main function.Optimize _runBody to avoid recursion.
AsyncLoop:
AsyncLoop.forEach._runBody to avoid recursion.asyncTry:
onError block.onFinally block.try/catch blocks.FutureExtension and FutureOrExtension:
FutureExtension and FutureOrExtension:
type getter to genericType to avoid issues with nullable variables.whereNotNull renamed to whereNotNullSync to avoid conflict with package collection.
whereNotNull renamed to whereNotNullSync to avoid conflict with package collection.Executes a block in a try, then, catch and finally execution chain.
asyncTry:
block in a try, then, catch and finally execution chain.- New extension methods: - resolveOther - resolveAllNullable - New Map extension methods: - resolveAllKeys - resolveAllEntries - resolveAllValues - re
resolveOtherresolveAllNullableMap extension methods:
resolveAllKeysresolveAllEntriesresolveAllValuesresolveAllValuesNullableNew extension methods for nullable types:
whereNotNullwhereNotNullResolvedresolveAllNotNullisResolved detection for when T is Object or dynamic.The package now exports dart:async.
dart:async.List and Set won't be converted to List when not needed.Added AsyncLoop and AsyncSequenceLoop.
AsyncLoop and AsyncSequenceLoop.- Added FutureOr.then.
FutureOr.then.Added resolveBoth for FutureOr and Future.
resolveBoth for FutureOr and Future.Future and FutureOr arithmetic operators.async_extension_benchmark.dartasync_extension_benchmark2.dartAdjusted pubspec.yaml description.
pubspec.yaml description.FOSSA scan and badges.- Initial version.
Your coding agent can read these notes before it upgrades. Set up the MCP server →