2 // EvolutionPicker.swift
5 // Created by Ruben Beltran del Rio on 2/4/21.
10 struct EvolutionPicker: View {
12 @EnvironmentObject private var store: AppStore
14 private var selectedEvolution: Binding<StageType> {
16 get: { store.state.selectedEvolution },
18 store.send(.selectEvolution(evolution: evolution))
24 Picker("Evolution", selection: selectedEvolution) {
25 ForEach(StageType.types) { stage in
26 Text(Stage.title(stage)).tag(stage).padding(4.0)
29 ForEach(StageType.characteristics) { stage in
30 Text(Stage.title(stage)).tag(stage).padding(4.0)
33 ForEach(StageType.properties) { stage in
34 Text(Stage.title(stage)).tag(stage).padding(4.0)
37 ForEach(StageType.custom) { stage in
38 Text(Stage.title(stage)).tag(stage).padding(4.0)
40 }.padding(.horizontal, 8.0).padding(.vertical, 4.0)
44 struct EvolutionPicker_Previews: PreviewProvider {
45 static var previews: some View {