Skip to content
pubscout

async

2.13.1, released 8 months ago by dart.dev

Utility classes and helpers that extend Dart's async library.

WASM-ready
$ flutter pub add async
Source repository

What it does

Provides wrappers, transformers, and helpers for Futures, Streams, and async operations such as caching, memoizing, cancelable operations, and stream grouping. Includes convenience classes like RestartableTimer and Result.

AI-written summary of version 2.13.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need advanced stream manipulation or cancellation support
  • You want to cache or memoize expensive async results

Skip it when

  • You only need simple async without extra helpers
  • You require a full state‑management solution

Strengths

  • Rich set of async utilities
  • Well‑maintained by Dart team
  • Works on all Dart platforms

Weaknesses

  • Adds extra abstraction layer
  • May be overkill for tiny projects

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:async/async.dart';

Future<void> main() async {
  final memoizer = AsyncMemoizer();
  await memoizer.runOnce(() async => await fetchData());
}

Future<String> fetchData() async => 'data';

Alternatives

Packages that do the same job and could replace async.

  • gtk

    GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.

  • ffi

    Utilities for working with Foreign Function Interface (FFI) code in Dart.

  • black_hole_flutter

    Flutter utility functions, extension methods, and custom widgets.

  • at_utils

    Utility library for Atsign Protocol projects with atSign helpers and logging.

Works with

Packages commonly used together with async: ones it builds on, ones built on it, and its own family.