```swift
@State private var selectedFlavor: Flavor = .chocolate
var body: some View {
Form {
Picker("Flavor",
selection: $selectedFlavor) {
ForEach(Flavor.allCases) {
Text($0.description)
.tag($0)
}
}
).pickerStyle(.automatic)
}
}
```
Youtuber @CodeWithWilliamJiamin's Website
```swift
@State private var selectedFlavor: Flavor = .chocolate
var body: some View {
Form {
Picker("Flavor",
selection: $selectedFlavor) {
ForEach(Flavor.allCases) {
Text($0.description)
.tag($0)
}
}
).pickerStyle(.automatic)
}
}
```