Since SwiftUI is declarative there is no dismiss methode. How can is add a dismiss/close button to the DetailView?
dismiss
DetailView
You can implement this.
struct view: View { @Environment(\.isPresented) private var isPresented private func dismiss() { isPresented?.value = false } }