listenWhen property
Optional predicate to determine whether to call listener when the state changes.
If listenWhen returns true, listener will be called. If null, always calls listener.
Implementation
final bool Function(S previous, S current)? listenWhen;