'SwiftUI How to change Picker's row height

I am new to SwiftUI, I am trying to find a way to increase the Picker's rows height but can't find any solution anywhere, now the items overlap. (The row's width you can see in the image is actually the picker rows height because I rotated the picker 90 degrees)

This is the one where the rows are very narrow This is the current one This is what I have achieved in Swift5 This is what I want to achieve

Code.

struct ContentView: View {
    @Environment(\.managedObjectContext) private var viewContext

    @FetchRequest(
        sortDescriptors: [NSSortDescriptor(keyPath: \Item.timestamp, ascending: true)],
        animation: .default)
    
    private var items: FetchedResults<Item>

    var workMinutes = [20, 25, 30, 35, 40, 45, 50, 55, 60]
    var breakMinutes = [5, 10, 15, 20]
    let minutesUnit = "mins"
    @State private var selectedIndex = 0

    var body: some View {
        
        ZStack {
            Image("Tomato1")
                .resizable()
                .padding(.all, 20)
                .frame(width: 300, height: 300, alignment: .center)
            VStack(spacing: 0) {
                Picker("Please choose a color", selection: $selectedIndex) {

                    ForEach(workMinutes, id: \.self) {
                        let id = $0
                        VStack {
                            Text("\(id) \(minutesUnit)")
                                
                        }
                        .frame(height: 200)
                        .rotationEffect(Angle(degrees: -90))
                    }
                }
                .environment(\.defaultMinListRowHeight, 100)
                .frame(height: 400)
                .pickerStyle(.wheel)
                .rotationEffect(Angle(degrees: 90))
            }
        
        }
        
    }
}

private let itemFormatter: DateFormatter = {
    let formatter = DateFormatter()
    formatter.dateStyle = .short
    formatter.timeStyle = .medium
    return formatter
}()

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)
    }
}




Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source