show

abstract suspend fun <Result : Any> show(overlay: Overlay<Result>): Result(source)

Shows the given overlay and suspends until the overlay is finished with a Result. The overlay should always signal a result (even if it's just something like Result.Dismissed) so that the OverlayHost can properly clear its currentOverlayData.

If no data is needed in a result, use Unit for the result type.

This function should only be called from UI contexts and not presenters, as overlays are a UI concern.