init(_:isExpanded:content:)
Creates a disclosure group, using a provided localized string key to create a text view for the label, and a binding to the expansion state (expanded or collapsed).
Declaration
nonisolated init(_ titleKey: LocalizedStringKey, isExpanded: Binding<Bool>, @ViewBuilder content: @escaping () -> Content)Parameters
- titleKey:
The key for the localized label of
selfthat describes the content of the disclosure group. - isExpanded:
A binding to a Boolean value that determines the group’s expansion state (expanded or collapsed).
- content:
The content shown when the disclosure group expands.