Skip to content

//workflow/com.squareup.workflow1.ui/ViewEnvironment

ViewEnvironment

[jvm] @WorkflowUiExperimentalApi()

class ViewEnvironment

Immutable map of values that a parent view can pass down to its children. Allows containers to give descendants information about the context in which they’re drawing.

Calling Screen.withEnvironment on a Screen is the easiest way to customize its environment before rendering it.

Types

Name Summary
Companion [jvm]
Content
object Companion


Functions

Name Summary
equals [jvm]
Content
open operator override fun equals(other: Any?): Boolean


get [jvm]
Content
operator fun <T : Any> get(key: ViewEnvironmentKey<T>): T


hashCode [jvm]
Content
open override fun hashCode(): Int


plus [jvm]
Content
operator fun plus(other: ViewEnvironment): ViewEnvironment
operator fun <T : Any> plus(pair: Pair<ViewEnvironmentKey<T>, T>): ViewEnvironment


toString [jvm]
Content
open override fun toString(): String


Properties

Name Summary
map [jvm] val map: Map<ViewEnvironmentKey<*>, Any>

Extensions

Name Summary
plus [androidJvm, jvm]
Content
[androidJvm]
@WorkflowUiExperimentalApi()

operator fun ViewEnvironment.plus(config: BackStackConfig): ViewEnvironment
[androidJvm]
@WorkflowUiExperimentalApi()

operator fun ViewEnvironment.plus(onBackPressed: ModalScreenOverlayOnBackPressed): ViewEnvironment
[jvm]
@WorkflowUiExperimentalApi()

operator fun ViewEnvironment.plus(registry: ViewRegistry): ViewEnvironment


withCompositionRoot [androidJvm]
Content
@WorkflowUiExperimentalApi()

fun ViewEnvironment.withCompositionRoot(root: CompositionRoot): ViewEnvironment
More info
Convenience function for applying a CompositionRoot to this ViewEnvironment‘s ScreenViewFactoryFinder.