Dart 3 compatible

funx

A Dart package of composable function decorators. Wrap ordinary functions in small, chainable building blocks for timing, concurrency, reliability, caching, observability, and more.

Version 1.3.1 · MIT License

ƒ(x)lockretrycacheguardtimeoutobserve

Explore the docs

Each category groups related decorators so you can find the right tool quickly.

rocket_launch

Get Started

Read the full overview, install the package, and run your first decorator.

token

Core

The building blocks: Func, Func1, Func2, validation, guards, and snapshots.

sync_alt

Concurrency

Locks, semaphores, pools, and isolates for safe parallel execution.

account_tree

Control Flow

Branch, loop, gate, and compose functions with predictable control flow.

error_outline

Error Handling

Retry, fallback, circuit breakers, and structured error recovery.

monitoring

Observability

Logs, metrics, tracing, and health checks for your functions.

hub

Orchestration

Sagas, schedules, pipelines, and distributed coordination.

speed

Performance

Caching, memoization, throttling, and debouncing.

replay

Reliability

Idempotency, timeouts, hedging, and bulkheads.

event_note

Scheduling

Run functions once, on intervals, with cron, or after delays.

storage

State

Snapshots, state machines, and persistent function state.

timer

Timing

Deadlines, timeouts, rate windows, and time-based policies.

transform

Transformation

Map, adapt, serialize, and reshape inputs and outputs.

verified

Validation

Schema checks, guards, contracts, and input validation.