init(isOn:intent:label:)
Creates a toggle performing an AppIntent.
Declaration
nonisolated init<I>(isOn: Bool, intent: I, @ViewBuilder label: () -> Label) where I : AppIntentParameters
- isOn:
Whether the toggle is on or off.
- intent:
The
AppIntentto be performed. - label:
A view that describes the purpose of the toggle.