How do I go about making sure the ui (widget) throws an exception during widget testing in Flutter. Here is my code that does not work:
expect(
  () => tester.tap(find.byIcon(Icons.send)),
  throwsA(const TypeMatcher<UnrecognizedTermException>()),
);
It fails with the following error
...
Expected: throws <Instance of 'TypeMatcher<UnrecognizedTermException>'>
  Actual: <Closure: () => Future<void>>
   Which: returned a Future that emitted <null>
OR......should I be testing how the UI handles an exception by looking for error messages, etc??