I have a swiftui app.
I want to remove the space that is automatically created on the top of the list, but without using the .listStyle(PlainListStyle()).
var body: some View {
VStack{
Text("HELLO")
List{
ForEach(1...3, id: \.self) {order in
Text("hello")
}
}
}
}
I added a picture about of the preview of the above code Please see the picture here
I tried multiple solutions online, like offset: -30, this won't work for me. Neither the .listStyle(PlainListStyle()) PlainListStyle will make my list elements use the entire screen, and I do not want that.