Asserts that the current state matches the predicate.
void expectState(bool Function(TState state) predicate, [String? reason]) { expect(predicate(bloc.state), isTrue, reason: reason); }