EnvironmentReader
public struct EnvironmentReader : Element
An element that dynamically builds its content based on the environment.
Use this element to build elements whose contents may change depending on the Environment
.
Example
EnvironmentReader { environment -> Element in
MyElement(
foo: environment.foo
)
}
Seealso
ProxyElementSeealso
Environment-
Declaration
Swift
public init(elementRepresentation: @escaping (_ environment: Environment) -> Element)
-
Declaration
Swift
public var content: ElementContent { get }
-
Declaration
Swift
public func backingViewDescription(with context: ViewDescriptionContext) -> ViewDescription?