watchOnly<T extends Listenable, R> method

R watchOnly<T extends Listenable, R>(
  1. R only(
    1. T
    )?, {
  2. T? target,
  3. String? instanceName,
})

like watch but for simple Listenable objects. It only triggers a rebuild when the value that only returns changes. With that you can react to changes of single members of T If only is null it will trigger a rebuild every time the Listenable changes in this case R has to be equal to T If target is not null whatch will observe this Object as Listenable instead of looking inside GetIt

Implementation

R watchOnly<T extends Listenable, R>(
  R Function(T)? only, {
  T? target,
  String? instanceName,
}) =>
    widget._state.value.watchOnly<T, R>(
        only: only, target: target, instanceName: instanceName);