On this SwiftUI picker, I need to differentiate among instrument selection tag: nil for toggling isShowingInstrumentsAdd, instrument to select one, and... what to do nothing at all?
Picker("* Instrumento", selection: $instrument, content: {
Text("Seleccionar").tag( ??? ) // <- Here
Label("Add or edit", systemImage: "plus").tag(nil as Instrument?)
ForEach(instruments) { instrument in
Text(instrument.name!).tag(instrument as Instrument?)
}
})
.onChange(of: instrument) { value in
if value == nil {
isShowingInstrumentsAdd.toggle()
}
}
Updated. Let me explain what I'm looking for. With the above code, I get this:
I'd like to present "Seleccionar" as default selection (no selection), "Add or edit" to present a new view, and ForEach selection to save selection its value. But, this way, I can't differentiate between the to first options. How could I accomplish this?

nil as Instrument?orOptional<Instrument>.none. But I don't understand why you have both a Label and a Text.