useListenable<T extends Listenable> function

T useListenable <T extends Listenable>(T listenable)

Subscribes to a Listenable and mark the widget as needing build whenever the listener is called.

See also:

Implementation

T useListenable<T extends Listenable>(T listenable) {
  Hook.use(_ListenableHook(listenable));
  return listenable;
}