impulse 0.6.1 copy "impulse: ^0.6.1" to clipboard
impulse: ^0.6.1 copied to clipboard

Minimalist state management and dependency injection.

example/impulse_example.dart

import 'package:impulse/impulse.dart';

final counterRef = Ref((store) => Counter());

class Counter extends ImpulseNotifier {
  int count = 0;

  void increment() {
    count += 1;
    notify();
  }
}

void main() async {
  $store.watch(counterRef, (count) => print('Count is $count'));

  $store.get(counterRef).increment();

  $store.reset();
}
1
likes
0
points
30
downloads

Publisher

verified publishervanzwolsoftware.nl

Weekly Downloads

Minimalist state management and dependency injection.

Repository (GitHub)
View/report issues

Topics

#state #reactive #dependency-injection

License

unknown (license)

Dependencies

meta

More

Packages that depend on impulse