We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0e8ace commit 1ad9e7cCopy full SHA for 1ad9e7c
WorkflowSwiftUIExperimental/Sources/EnvironmentValues+ViewEnvironment.swift renamed to ViewEnvironment/Sources/EnvironmentValues+ViewEnvironment.swift
@@ -14,16 +14,19 @@
14
* limitations under the License.
15
*/
16
17
-import SwiftUI
18
-import WorkflowUI
+#if canImport(SwiftUI)
19
20
-private struct ViewEnvironmentKey: EnvironmentKey {
21
- static let defaultValue: ViewEnvironment = .empty
22
-}
+import SwiftUI
23
24
-public extension EnvironmentValues {
25
- var viewEnvironment: ViewEnvironment {
+extension EnvironmentValues {
+ public var viewEnvironment: ViewEnvironment {
26
get { self[ViewEnvironmentKey.self] }
27
set { self[ViewEnvironmentKey.self] = newValue }
28
}
+
+ private struct ViewEnvironmentKey: EnvironmentKey {
+ static let defaultValue: ViewEnvironment = .empty
29
+ }
30
31
32
+#endif
0 commit comments