thenThrowAsync method

void thenThrowAsync(
  1. Object error
)

Stub to throw error asynchronously.

Implementation

void thenThrowAsync(Object error) => thenAnswer((_) => Future.error(error));