Skip to content
pubscout

value_notifier_tools

0.1.2, released 3 years ago by whynotmake.it

Lightweight tools like undo/redo, select, and where for ValueNotifiers

WASM-ready
$ flutter pub add value_notifier_tools
Source repository

What it does

Provides lightweight tools for working with ValueNotifiers, including HistoryValueNotifier for undo/redo functionality, SelectValueNotifier for selecting a subset of state, and WhereValueNotifier for filtering state changes with custom predicates.

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

Use it when

  • You want to add undo and redo functionality to a ValueNotifier in your app
  • You need to optimize widget rebuilds by selecting a subset of state or filtering changes with a custom predicate

Skip it when

  • You are using a full-featured state management solution like BLoC, Riverpod, or Provider that already includes these capabilities
  • You require complex dependency injection or global state architectures

Strengths

  • No dependencies on other packages and super lightweight
  • Includes 100% test coverage
  • Provides both mixins and classes for custom ValueNotifiers

Weaknesses

  • Limited to ValueNotifier use cases
  • Does not replace a complete state management framework for large applications

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Not documented

final notifier = HistoryValueNotifier<int>(0);
notifier.value = 1;
notifier.undo(); // 0
notifier.redo(); // 1

Works with

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