title: Unresolved reference: asLiveData while converting Flow to LiveData
body: <p>I have the following situation:</p>
  
  <p>There's my repository class:</p>
  
  <pre><code>import com.mikhailovskii.timesapp.util.Result
  import kotlinx.coroutines.delay
  import kotlinx.coroutines.flow.flow
  
  class LoginRepository {
  
      fun fetchUser() = flow {
          emit(Result.Loading)
          delay(1000)
          emit(Result.Success((0..20).random()))
      }
  
  }
  </code></pre>
  
  <p>There's ViewModel class:</p>
  
  <pre><code>import androidx.lifecycle.LiveData
  import androidx.lifecycle.ViewModel
  import com.mikhailovskii.timesapp.util.Result
  
  class LoginViewModel() : ViewModel() {
  
      private val loginRepository = LoginRepository()
  
      private val a = loginRepository.fetchUser()
  
  
      val user: LiveData&lt;Result&lt;Int&gt;&gt; get() = loginRepository.fetchUser().asLiveData()
  
  }
  </code></pre>
  
  <p>And there's Result class:</p>
  
  <pre><code>sealed class Result&lt;out R&gt; {
  
      data class Success&lt;out T&gt;(val data: T) : Result&lt;T&gt;()
  
      object Loading : Result&lt;Nothing&gt;()
  
      object Error : Result&lt;Nothing&gt;()
  
  }
  </code></pre>
  
  <p>So, when I try to convert the Repository's Flow to the LiveData with the help of <code>asLiveData</code> method, <code>asLiveData</code> is underlined and studio writes that it's an unresolved reference. But I cannot understand why does it happens, as repository returns Flow. So, how what's the problem and how can I solve it?</p>