I then end up with a weird extra thin border underneath the textField.
It is listRowSeparator
. you can make it hidden with this modifier:
.listRowSeparator(.hidden)
Also, the Form
and the List
have some default inset. You can customize them with this modifier:
.listRowInsets(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
It is important to put wich modifier where. There are other detailed answers in the stack overflow like this one which is color coded each one:
How to remove the left and right Padding of a List in SwiftUI?