Recreate a Flutter UI in SwiftUI

  Kiến thức lập trình

The flutter UI I made
I want to recreate this UI in SwiftUI but I can’t seem to get the border of the next image to show:
SwiftUI Image

This is my code:

var body: some View {
        ZStack {
            RadialGradient(gradient: Gradient(colors: [Color.white, Color.blue]), center: .center, startRadius: 0,          endRadius: 200)
                .edgesIgnoringSafeArea(.all)
            
            VStack(spacing: 75) {
                Spacer()
                
                Text("Drippy Pics")
                    .font(.system(size: 40))
                    .fontWeight(.bold)
                
                TabView {
                    ForEach(1..<11) { index in
                        LazyHStack {
                            Image("AppIcon(index)")
                                .resizable()
                                .aspectRatio(contentMode: .fit)
                                .frame(width: 300, height: 300)
                                .cornerRadius(20)
                                .frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
                        }
                        .frame(width: 300, height: 300)
                    }
                }
                .tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
                .indexViewStyle(.page(backgroundDisplayMode: .always))
                
                
                Spacer()
            }
            .foregroundColor(.black)
        }
    }

LEAVE A COMMENT