I was trying to hide view but noticed that view.hidden()
will only hide the view but but the space remains.
I also tried some of the suggestions on this link Dynamically hiding view in SwiftUI But it didn't really work for me, albeit it was a starting point.
Find below what I finally did.