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(),
);
1
likes
160
pub points
49%
popularity

Publisher

verified publishereronsoft.com

An elementary yet adaptable state management solution for Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, reduct

More

Packages that depend on flutter_reduct