ambient Of
fun <T> ambientOf(policy: SnapshotMutationPolicy<T> = @OptIn(ExperimentalComposeApi::class)
structuralEqualityPolicy(), defaultFactory: () -> T? = null): ProvidableAmbient<T>
Content copied to clipboard
Create an ambient key that can be provided using Providers. Changing the value provided during recomposition will invalidate the children of Providers that read the value using Ambient.current.
See also
Parameters
policy
a policy to determine when an ambient is considered changed. See SnapshotMutationPolicy for details.