expectState method

void expectState(
  1. bool predicate(
    1. TState state
    ), [
  2. String? reason
])

Asserts that the current state matches the predicate.

Implementation

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