Here's an example of stroking a shape with a dotted line:
struct ContentView: View {
var body: some View {
Rectangle()
.stroke(style: StrokeStyle(lineWidth: 5, lineCap: .round, dash: [0,10]))
.frame(width: 100, height: 100)
}
}