useOnListenableChange function
Adds a given listener
to a Listenable and removes it when the hook is
disposed.
As opposed to useListenable
, this hook does not mark the widget as needing
build when the listener is called. Use this for side effects that do not
require a rebuild.
See also:
Implementation
void useOnListenableChange(
Listenable? listenable,
VoidCallback listener,
) {
return use(_OnListenableChangeHook(listenable, listener));
}