flutter_reduct 1.0.1 copy "flutter_reduct: ^1.0.1" to clipboard
flutter_reduct: ^1.0.1 copied to clipboard

An elementary yet adaptable state management solution for Dart.

Flutter Reduct #

A flutter widgets for reduct library.

Install #

flutter pub add flutter_reduct

AtomBuilder #

final counterState = Atom(0);

...
// Inside widget builder:
AtomBuilder<int>(
  atom: counterState,
  builder: (context, value) => Text('Counter: $value'),
);

AtomListener #

final counterState = Atom(0);

...
// Inside widget builder:
AtomListener<int>(
  atom: counterState,
  listener: (context, count) {
    final snackBar = SnackBar(content: Text('Counter: $count'));
    ScaffoldMessenger.of(context).showSnackBar(snackBar);
  },
  child: Container(),
);
2
likes
160
points
26
downloads

Publisher

verified publishereronsoft.com

Weekly Downloads

An elementary yet adaptable state management solution for Dart.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, reduct

More

Packages that depend on flutter_reduct