Contents

init()

Creates a button toggle style.

Declaration

init()

Discussion

Don’t call this initializer directly. Instead, use the button static variable to create this style:

Toggle(isOn: $isFlagged) {
    Label("Flag", systemImage: "flag.fill")
}
.toggleStyle(.button)