listen method

T listen(
  1. void onChange(
    1. T ntf
    )?, {
  2. bool where(
    1. T ntf
    )?,
})

where filter the notification,

Implementation

T listen(void Function(T ntf)? onChange, {bool Function(T ntf)? where}) =>
    this..addListener(() {
      if (where?.call(this) ?? true) onChange?.call(this);
    });