Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Thank you very much for your answer! This is nice, but I'm still missing something from my question: What if (after a backend call) I find out that there are let's say 6 view insted of four? I need something even more dynamic I guess! Or is it my question weird? Commented Aug 27, 2020 at 7:59
  • It does not matter how many views - you need anyway to declare them and to create them somewhere. Commented Aug 27, 2020 at 8:28
  • Ok this is correct. So I put a limit, let say max 6 view, and I create all of them. And I render the ones I need only. May I ask, how do I use this fantastic enum? I mean, at the moment I have the if statement inside a VStack that containts the HStack with our menu,search,settings (with index) etc. But when I click in one of this how do I use the enum to render the correct view? Commented Aug 27, 2020 at 8:47
  • thank you man, I really appreaciate, this is what I was looking for. Commented Aug 27, 2020 at 9:02
  • Is it possible we are missing something? I just tested the code and with a simple check like (Choices.menu).view() to see if it works, nothing happened Commented Aug 27, 2020 at 10:24