Skip to content
pubscout

rx_notifier

2.3.0, released 3 years ago by flutterando.com.br

Extends ValueNotifier with functional reactive programming and observers.

WASM-ready
$ flutter pub add rx_notifier
Source repository

What it does

Provides RxNotifier, RxBuilder, RxRoot, and reactive collections (RxList, RxMap, RxSet) to manage state reactively in Flutter. It adds computed getters, async wrappers, and optional code generation for concise syntax.

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

Use it when

  • Need lightweight reactive state management
  • Want computed values via getters
  • Prefer no boilerplate for simple state changes
  • Need reactive collections and async wrappers

Skip it when

  • Complex multi‑layer state trees requiring deep context propagation
  • Projects already using a mature state‑management library like Bloc or Provider

Strengths

  • Simple API built on ValueNotifier
  • Computed values via getters
  • Reactive collections and async wrappers
  • Optional code generation for concise syntax

Weaknesses

  • Limited to ValueNotifier‑based state
  • Not as feature‑rich as Bloc or Riverpod
  • Community adoption is lower
  • No built‑in dependency injection or navigation support

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
2

Add dependency in pubspec. For code generation add rx_notifier_generator and build_runner to dev_dependencies and run build_runner. No special permissions required.

final counter = RxNotifier<int>(0);

RxDisposer disposer = rxObserver(() {
  print(counter.value);
});

disposer();

Alternatives

Packages that do the same job and could replace rx_notifier.

  • rxdart_ext

    Extension methods and classes built on top of RxDart like Single and StateStream.

  • mobx

    Transparent functional reactive state management using observables, actions, and reactions.

  • flutter_mobx

    Flutter integration for MobX, providing reactive Observer widgets.

  • live_cells

    A simpler, more flexible reactive replacement for ChangeNotifier and ValueNotifier.