andExpectLater function

Future<void> andExpectLater(
  1. String description,
  2. dynamic actual,
  3. dynamic matcher, {
  4. String? reason,
  5. dynamic skip,
})

Implementation

Future<void> andExpectLater(
  String description,
  dynamic actual,
  dynamic matcher, {
  String? reason,
  dynamic skip, // true or a String
}) {
  final state = Zone.current[stateKey] as State?;

  switch (state?.key) {
    case thenKey:
      return thenExpectLater(
        description,
        actual,
        matcher,
        reason: reason,
        skip: skip,
      );
    default:
      throw Exception('Use after kind of then');
  }
}