Sobes.tech
Junior — Senior

Organization of search queries in ViewModel based on input text

livecode

Task condition

In the ViewModel, there is a method onTextChanged, which receives the current content of the input field. It is necessary to build a reactive chain that will perform a server request to get search results based on the received text.

suspend fun search(request: String): List<SearchResult>

fun onTextChanged(newText: String)