fix(android): resolve local asset image resource loading using asyncimage and bundle url

This commit is contained in:
Daniel Arantes Loverde
2026-05-27 15:01:49 -03:00
parent c14bd7a928
commit 215d208f4f
24 changed files with 103 additions and 36 deletions

View File

@@ -26,11 +26,17 @@ struct OtpView: View {
ScrollView {
VStack(spacing: 0) {
#if os(Android)
SwiftUI.Image("pedifoods", bundle: .module)
.resizable()
.scaledToFit()
.frame(width: 74, height: 74)
.padding(.top, 140)
AsyncImage(url: Bundle.module.url(forResource: "pedifoods", withExtension: "png")) { phase in
if let image = phase.image {
image
.resizable()
} else {
Color.clear
}
}
.scaledToFit()
.frame(width: 74, height: 74)
.padding(.top, 140)
#else
SwiftUI.Image("pedifoods")
.resizable()