Using SwiftUI how can I customize the checkmark icon of the selected flavor in this simple Picker?
struct ContentView: View {
var flavors = ["orange", "strawberry", "lemon"]
@State private var selected: String = "orange"
var body: some View {
List {
Picker("Choose a flavor", selection: $selected) {
ForEach(flavors, id: \.self) {
Text($0)
}
}
.pickerStyle(.inline)
}
}
}
You'll have to create your own custom view inside a list to allow users to select options like this