throwOnMissingStub static method Null safety

void throwOnMissingStub(
  1. {void exceptionBuilder(
    1. Invocation

A method which can be invoked to trigger all unstubbed methods to result in exceptions.

This is equivalent to calling throwOnMissingStub with a specific Mock but applies generally to all Mock instances.


static void throwOnMissingStub({
  void Function(Invocation)? exceptionBuilder,
}) {
  _defaultResponse = () => _exceptionResponse(exceptionBuilder);