title: Flutter Stubbing : use Stub method's return value property
body: <p>Hi this is the method i want to stub : the checkLimit method. </p>
  
  <pre><code>class MyClass {
  final ResponseBase isAvailable =
         await sampleRepository.checkLimit(data: _data);
          if (isAvailable.status == ResponseStatus.notOk) {
            yield NotAvailable(
              ErrorType.limit,
              data: _data,
              errorResponse: isAvailable?.responseError,
            );
  
            return;
          }
  } 
  </code></pre>
  
  <p>This is my Test </p>
  
  <pre><code> test('test when event is ScanQRCode checklimit not ok', () {
        final List&lt;ScanState&gt; expectedStates = &lt;CodeScanState&gt;[
          ScanReady(),
          ScanAvailableFetching(),
          ScanNotAvailable(
            ScanErrorType.Limit,
            redeemData: mockRedeemData,
          ),
        ];
  
        when(mockPromosRepository.checkLimit(
                redeemData: mockRedeemData))
            .thenAnswer(
                (_) =&gt; Future&lt;ResponseBase&gt;.value(mockResponseBase.status));
  
        expectLater(scanBloc.state, emitsInAnyOrder(expectedStates));
  
        scanBloc.dispatch(ScanQRCode(mockRedeemData));
      });
  </code></pre>
  
  <p>what should be my return data to through the if condition ? thanks </p>