whenInvoke method

void whenInvoke(
  1. String methodName,
  2. dynamic result
)

Stubs the response returned by invoke or invokeAs for methodName.

Implementation

void whenInvoke(String methodName, dynamic result) {
  _mockResults[methodName] = result;
}