Injected Dispatcher.IO not recognised as Dispatcher.IO

I have a warning on Files.list([path]):
Possibly blocking call in non-blocking context could lead to thread starvation

According to android best practises, coroutine dispatchers should be injected instead of used directly.
https://developer.android.com/kotlin/coroutines/coroutines-best-practices#inject-dispatchers

Yet the variable that holds the injected dispatcher is not recognised as Dispatcher.IO causing this warning.

Is there an interface, or an annotation etc that i can use to tell Android Studio that I guarantee that this dispatcher is Dispatcher.IO without directly writing Dispatcher.IO?

1 Like