Package-level declarations

Types

Link copied to clipboard
abstract class AnimatedOverlay<Result : Any>(val enterTransition: EnterTransition, val exitTransition: ExitTransition) : Overlay<Result>

An Overlay that can be animated in and more interestingly out after it has returned a Result. The Overlay is animated in and out by its enterTransition and exitTransition, AnimatedContent is executed with with AnimatedVisibilityScope so that child animations can be coordinated with the overlay's animations.

Link copied to clipboard
interface Overlay<Result : Any>

An Overlay is composable content that can be shown on top of other content via an OverlayHost . Overlays are typically used for one-off request/result flows and should not usually attempt to do any sort of external navigation or make any assumptions about the state of the app. They should only emit a Result to the given OverlayNavigator when they are done.

Link copied to clipboard

An OverlayHost can be used overlaysOverlay with content on top of other content. This is useful for one-off request/result flows such as:

Link copied to clipboard

Data managed by an OverlayHost to track the current overlay state. This should rarely be implemented by consumers!

Link copied to clipboard

An OverlayNavigator is a simple API offered to overlays to call finish with a result when they are done.

Link copied to clipboard

Represents the current state of the available OverlayHost.

Link copied to clipboard
annotation class ReadOnlyOverlayApi

Indicates that the annotated API is a read-only of the Circuit Overlay API and not intended for public implementation.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun ContentWithOverlays(modifier: Modifier = Modifier, overlayHost: OverlayHost = rememberOverlayHost(), content: @Composable () -> Unit)

Renders the given content with the ability to show overlays on top of it. This works by exposing an OverlayHost via LocalOverlayHost.

Link copied to clipboard
fun OverlayEffect(vararg keys: Any?, fallback: @Composable () -> Unit? = null, block: suspend CoroutineScope.(host: OverlayHost) -> Unit)

Calls the given block with the current OverlayHost if overlays are available. If overlays are unavailable, the fallback composable will be called instead.

Link copied to clipboard

Returns a remembered an OverlayHost that can be used to show overlays.