You can use the dismiss environment value.
@Environment(\.dismiss) var dismiss
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: