title: Calling two methods from a Future Either method, both with Future Either return type
body: <p>I have these two methods:</p>
  
  <pre><code>Future&lt;Either&lt;Failure, WorkEntity&gt;&gt; getWorkEntity({int id})
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Future&lt;Either&lt;Failure, WorkEntity&gt;&gt; updateWorkEntity({int id, DateTime executed})
  </code></pre>
  
  <p>They are both tested and work as expected. I then have this third method that combines the two:</p>
  
  <pre><code>Future&lt;Either&lt;Failure, WorkEntity&gt;&gt; call(Params params) async {
    final workEntityEither = await repository.getWorkEntity(id: params.id);
    return await workEntityEither.fold((failure) =&gt; Left(failure), (workEntity) =&gt; repository.updateWorkEntity(id: workEntity.id, executed: DateTime.now()));
  }
  </code></pre>
  
  <p>This method does not work, it always return null. I suspect it is because I do not know what to return in the fold methods. How can this be made to work?</p>
  
  <p>Thank you<br>
  Søren</p>