yschimke
05/01/2023, 4:25 PMSwipeToDismissBox(
onDismissed = { router.pop() },
state = rememberSwipeToDismissBoxState(),
backgroundKey = background?.configuration ?: SwipeToDismissKeys.Background,
hasBackground = background != null,
contentKey = active.configuration,
) { isBackground ->
val child = if (isBackground) requireNotNull(background) else active
holder.SaveableStateProvider(child.configuration.key()) {
CompositionLocalProvider(LocalComponentContext provides child.instance) {
HierarchicalFocusCoordinator(requiresFocus = { !isBackground }) {
content(child.configuration)
}
}
}
}
xxfast
05/04/2023, 10:37 PMyschimke
05/04/2023, 10:43 PM