I'm trying to create a dynamic bottombar with my own inherited class from DataProvider. Sometimes show a popup with bottom bor and sometimes without.
This is what I currently have (and works fine) -> with bottombar:
This is what I'm now trying but is failing (trying to delete the bottomBar at once):
I have the same issue with the reglar bottom bar. I need it to be shown in some cases, and in other cases not.
Why doens't the second piece of code doesn't work?
Can anyone help me with this?

