Generic Instance Method


Presents a sheet when a given condition is true.


func sheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content : View

See Also

Presenting Sheets

func sheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)?, content: (Item) -> Content) -> View

Presents a sheet using the given item as a data source for the sheet’s content.