listenWhen property

bool Function(T state)? listenWhen
final

An optional condition that determines whether the listener should be called when the rx object changes. If listenWhen evaluates to true, the listener will be called; otherwise, it will be skipped. The listenWhen callback receives the current state of the rx object as an argument.

Implementation

final bool Function(T state)? listenWhen;