title: Multiple Requests in Sequential Order - Kotlin Flow - Retrofit
body: <p>I've two suspend functions:</p>
  <ul>
  <li>login() : BaseResponse</li>
  <li>update() : BaseResponse</li>
  </ul>
  <p>I want to use kotlin flow to run both of them with the following scenario:</p>
  <ol>
  <li><p>run login() API  and wait till I have the response.</p>
  </li>
  <li><p>make a check of that response if it's true.</p>
  </li>
  <li><p>run the second API update().</p>
  </li>
  <li><p>then collecting the result with the second response.</p>
  </li>
  <li><p>if an error happened in login() return error and don't run the update() API.</p>
  </li>
  </ol>
  <p>please show a complete simple example of how I do this.</p>