StateConditionFunction<S> typedef
StateConditionFunction<S> =
bool Function(S? previous, S current)
Signature for the buildWhen and listenWhen functions which takes
the previous state and the current state and is responsible
for returning a bool which determines whether to the new state
should be emitted to the expected widget.
Implementation
typedef StateConditionFunction<S> = bool Function(S? previous, S current);