MainDispatcher
Qualifier annotation for injecting the Main coroutine dispatcher.
Use this annotation when you need explicit main thread dispatch for UI operations. Note: In Compose-based apps, this is rarely needed as collectAsStateWithLifecycle() automatically dispatches to the main thread.
Usage Example
class ViewHelper @Inject constructor(
@MainDispatcher private val mainDispatcher: CoroutineDispatcher
)Content copied to clipboard