consoleIn
@ExperimentalCoroutinesApi
Creates a flow of strings read from the console input (stdin) using the specified dispatcher.
Return
A flow of strings read from the console input.
Example usage:
val consoleInputFlow = consoleIn()
consoleInputFlow.collect { input -> println("You entered: $input") }
Content copied to clipboard
Parameters
dispatcher
The CoroutineDispatcher to use for reading from stdin. Defaults to a single-threaded dispatcher.