cubepod_async 0.1.5 copy "cubepod_async: ^0.1.5" to clipboard
cubepod_async: ^0.1.5 copied to clipboard

Asynchronous utilities and stream management for the CubePod framework.

cubepod_async #

Async utilities for CubePod — cancellation, retry, debounce, and more.

What's inside #

  • CancellationToken — cancel any in-flight async operation cleanly
  • RetryPolicy — configurable exponential backoff retry logic
  • Debounce — delay execution until input stops changing
  • AsyncSignal<T> — reactive wrapper for async state (loading/data/error)
  • AsyncStreamSignal<T> — reactive wrapper for stream-based async state

Install #

dependencies:
  cubepod_async: ^0.1.1

Usage #

import 'package:cubepod_async/cubepod_async.dart';

// Cancellable fetch
final token = CancellationToken();
final data = await fetchUser(token: token);
token.cancel(); // cancels if still running

// Retry with backoff
final policy = RetryPolicy(maxAttempts: 3, delay: Duration(seconds: 2));
await policy.run(() => api.uploadFile(file));

// Debounce search input
final search = Debounce<String>(delay: Duration(milliseconds: 300));
search.call(query, () => runSearch(query));

See cubepod for the full docs.

0
likes
130
points
336
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Asynchronous utilities and stream management for the CubePod framework.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

cubepod_core, cubepod_state

More

Packages that depend on cubepod_async