Skip to content
pubscout

state_beacon

3.1.3, released 2 days ago by nosy.dev

Reactive primitive and state management solution based on signals and node coloring.

WASM-ready
$ flutter pub add state_beacon
Source repository

What it does

State_beacon provides reactive primitives like signals, derived values, effects, and asynchronous state handlers. It automatically tracks dependencies and updates dependent widgets or calculations when values change.

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

Use it when

  • You want signal-based reactivity for Dart and Flutter apps without code generation.
  • You need to handle complex asynchronous state transitions with automatic loading, error, and data states.
  • You want fine-grained widget rebuilding using .watch(context).

Skip it when

  • You prefer strict BLoC architectural patterns and event-driven architectures.
  • Your project standardizes entirely around Riverpod or Provider.

Strengths

  • Fine-grained reactivity without boilerplate or code generation.
  • Built-in support for asynchronous operations via FutureBeacon and StreamBeacon with AsyncValue states.
  • Extensive helper methods for debouncing, throttling, buffering, filtering, and undo/redo.

Weaknesses

  • Relatively new package with a smaller ecosystem compared to Riverpod or Provider.
  • Accidentally accessing dependencies after an async gap will fail to track them.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

No special native permissions or build_runner steps required.

import 'package:flutter/material.dart';
import 'package:state_beacon/state_beacon.dart';

final name = Beacon.writable("Bob");

class ProfileCard extends StatelessWidget {
  const ProfileCard({super.key});

  @override
  Widget build(BuildContext context) {
    return Text(name.watch(context));
  }
}

Alternatives

Packages that do the same job and could replace state_beacon.

  • riverpod

    If you prefer a compile-safe, provider-based dependency injection and state management solution.

  • bloc

    If you require strict separation of concerns using events and states with predictable state transitions.

  • provider

    If you want a simple, classic inherited widget wrapper for dependency injection and basic state changes.

Works with

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