InterceptPlatformTextInput
Common
@ExperimentalComposeUiApi
@Composable
fun InterceptPlatformTextInput(
interceptor: PlatformTextInputInterceptor,
content: @Composable () -> Unit,
)
Intercept all calls to PlatformTextInputSession.startInputMethod from below where this composition local is provided with the given PlatformTextInputInterceptor.
If a different interceptor instance is passed between compositions while a text input session is active, the upstream session will be torn down and restarted with the new interceptor. The downstream session (i.e. the call to PlatformTextInputSession.startInputMethod) will not be cancelled and the request will be re-used to pass to the new interceptor.