File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Sources/SwiftCrossUI/Views Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import Foundation
2- import ImageFormats
2+ @ preconcurrency import ImageFormats
33
44/// A view that displays an image.
5- public struct Image : TypeSafeView , View {
5+ public struct Image : Sendable {
66 private var isResizable = false
77 private var source : Source
88
@@ -11,8 +11,6 @@ public struct Image: TypeSafeView, View {
1111 case image( ImageFormats . Image < RGBA > )
1212 }
1313
14- public var body = EmptyView ( )
15-
1614 /// Displays an image file. `png`, `jpg`, and `webp` are supported.
1715 /// - Parameters:
1816 /// - url: The url of the file to display.
@@ -39,7 +37,13 @@ public struct Image: TypeSafeView, View {
3937 self . source = source
4038 self . isResizable = resizable
4139 }
40+ }
41+
42+ extension Image : View {
43+ public var body : some View { return EmptyView ( ) }
44+ }
4245
46+ extension Image : TypeSafeView {
4347 func layoutableChildren< Backend: AppBackend > (
4448 backend: Backend ,
4549 children: _ImageChildren
You can’t perform that action at this time.
0 commit comments