fix(android): resolve local asset image resource loading using asyncimage and bundle url
This commit is contained in:
@@ -37,8 +37,14 @@ struct LaunchSplashView: View {
|
||||
|
||||
@ViewBuilder var splashLogo: some View {
|
||||
#if os(Android)
|
||||
SwiftUI.Image("pedifoods", bundle: .module)
|
||||
.resizable()
|
||||
AsyncImage(url: Bundle.module.url(forResource: "pedifoods", withExtension: "png")) { phase in
|
||||
if let image = phase.image {
|
||||
image
|
||||
.resizable()
|
||||
} else {
|
||||
Color.clear
|
||||
}
|
||||
}
|
||||
#else
|
||||
SwiftUI.Image("pedifoods")
|
||||
.resizable()
|
||||
|
||||
Reference in New Issue
Block a user