//workflow/com.squareup.workflow1.ui/ViewEnvironment
ViewEnvironment¶
[androidJvm] @WorkflowUiExperimentalApi()
class ViewEnvironment(map: Map<ViewEnvironmentKey<*>, Any>)
Immutable, append-only map of values that a parent view can pass down to its children via View.showRendering et al. Allows container views to give descendants information about the context in which they’re drawing.
Constructors¶
ViewEnvironment | [androidJvm] fun ViewEnvironment(map: Map<ViewEnvironmentKey<*>, Any> = emptyMap()) |
Functions¶
Name | Summary |
---|---|
equals | [androidJvm] Content open operator override fun equals(other: Any?): Boolean |
get | [androidJvm] Content operator fun <T : Any> get(key: ViewEnvironmentKey<T>): T |
hashCode | [androidJvm] Content open override fun hashCode(): Int |
plus | [androidJvm] Content operator fun plus(other: ViewEnvironment): ViewEnvironment operator fun <T : Any> plus(pair: Pair<ViewEnvironmentKey<T>, T>): ViewEnvironment |
toString | [androidJvm] Content open override fun toString(): String |
Properties¶
Name | Summary |
---|---|
map | [androidJvm] val map: Map<ViewEnvironmentKey<*>, Any> |
Extensions¶
Name | Summary |
---|---|
withCompositionRoot | [androidJvm] Content @WorkflowUiExperimentalApi() fun ViewEnvironment.withCompositionRoot(root: CompositionRoot): ViewEnvironment More info Convenience function for applying a CompositionRoot to this ViewEnvironment‘s ViewRegistry. |