title: Mockito - stub a method after the null-safety migration
body: <p>Before the null safety I could simply mock up the <strong>sendRequest(...)</strong> method like that:</p>
  <pre><code> void stubBaseRepositorySendRequestResponse(String response) {
      when(baseRepository.sendRequest(onGetData: anyNamed('onGetData')))
          .thenAnswer((_) {
        return Future&lt;String&gt;.value(response);
      });
    }
  </code></pre>
  <p>where the signature of this method is:</p>
  <pre><code>Future&lt;T&gt; sendRequest&lt;T&gt;({required Future&lt;T&gt; Function() onGetData})
  </code></pre>
  <p>How can this be done with the new null-safe version of mockito?
  Can I still maintain the generic character of this stub and allow for any arguments to be passed in?</p>