subscribe<A> abstract method

void subscribe<A>(
  1. Atom<A> atom,
  2. void handler(
    1. A value
    ), {
  3. bool fireImmediately = false,
})

Subscribe to the given atom, automatically cancelling the subscription when this atom is disposed.

Implementation

void subscribe<A>(
  Atom<A> atom,
  void Function(A value) handler, {
  bool fireImmediately = false,
});