title: How to call specific named argument which is a result of another function? Kotlin
body: <p>In order to make a call to an API I'm collecting two values from the user:</p>
  <ol>
  <li>The input text</li>
  <li>A default string which lives in a variable and changes when the user select a filter in a radio group. Eg: &quot;name&quot;, &quot;status&quot;, &quot;gender&quot;</li>
  </ol>
  <p>Once a got these values I need to call the next function.</p>
  <pre><code>    fun getCharacter(name: String? = null, status: String? = null, species: String? = null, type: String? = null, gender: String? = null) {
              //code
  }
  </code></pre>
  <p>Manually I would call <code>viewModel.getCharacter(status = &quot;alive&quot;)</code> but I need a way to specify the named argument but itself because it depends what the user selected.</p>
  <p>Any ideas?</p>
  <p>edit: At the end this function calls a suspend function handled by retrofit</p>
  <pre><code>@GET(&quot;character/&quot;)
     suspend fun getCharacter(
             @Query (&quot;name&quot;) name: String?,
             @Query(&quot;status&quot;) status: String?,
             @Query(&quot;species&quot;) species: String?,
             @Query(&quot;type&quot;) type: String?,
             @Query(&quot;gender&quot;) gender: String?,
  
     ): CharacterResponse
  </code></pre>