throwOnMissingStub function
Opt-into Mock throwing NoSuchMethodError for unimplemented methods.
The default behavior when not using this is to always return null
.
Implementation
void throwOnMissingStub(
Mock mock, {
void Function(Invocation)? exceptionBuilder,
}) {
_defaultResponses[mock] = () => _exceptionResponse(exceptionBuilder);
}