Property

LocalTextClassifierCoroutineContext

The CoroutineContext used for launching TextClassifier operations within the selection features.

Source set: Android
public val LocalTextClassifierCoroutineContext: ProvidableCompositionLocal<CoroutineContext> =
    staticCompositionLocalOf<CoroutineContext> { Dispatchers.IO }

The CoroutineContext used for launching TextClassifier operations within the selection features.

This context is expected to be associated with a worker thread to ensure that text classification, which can be a time-consuming operation, does not block the UI thread. Providing a CoroutineContext not backed by a worker thread may lead to performance issues or unexpected behavior with TextClassifier.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: