title: Getx() and hide bottomnavigation bar - error with stateful widget rendering
body: <p>I have a stateful widget (<a href="https://pub.dev/packages/miniplayer" rel="nofollow noreferrer">miniplayer</a>) in my stateless widget. I am trying to hide the bottomnavigation bar and getting the below error when I use Obx... Any idea how to fix this?</p>
  <p>I/flutter ( 9567): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
  I/flutter ( 9567): The following assertion was thrown building ValueListenableBuilder(dirty, dependencies:
  I/flutter ( 9567): [_LocalizationsScope-[GlobalKey#87424], _InheritedTheme], state:
  I/flutter ( 9567): _ValueListenableBuilderState#23ae3):
  I/flutter ( 9567): setState() or markNeedsBuild() called during build.
  I/flutter ( 9567): This Obx widget cannot be marked as needing to build because the framework is already in the process
  I/flutter ( 9567): of building widgets.  A widget can be marked as needing to be built during the build phase only if
  I/flutter ( 9567): one of its ancestors is currently building. This exception is allowed because the framework builds
  I/flutter ( 9567): parent widgets before children, which means a dirty descendant will always be built. Otherwise, the
  I/flutter ( 9567): framework might not visit this widget during this build phase.
  I/flutter ( 9567): The widget on which setState() or markNeedsBuild() was called was:
  I/flutter ( 9567):   Obx
  I/flutter ( 9567): The widget which was currently being built when the offending call was made was:
  I/flutter ( 9567):   ValueListenableBuilder
  I/flutter ( 9567):
  I/flutter ( 9567): The relevant error-causing widget was:
  I/flutter ( 9567):   <strong>Miniplayer</strong></p>
  <p>Code for bottomnavigation</p>
  <pre><code> bottomNavigationBar: Container(
            child: Obx(
              () =&gt; !_videoController.showBottomNavigation.value
                  ? SizedBox.shrink()
                  : BottomNavigationBar(
                      currentIndex: 0,
                      fixedColor: Colors.blue,
                      items: [
                        BottomNavigationBarItem(
                          icon: Icon(Icons.home),
                          label: 'Home',
                        ),
                        BottomNavigationBarItem(
                          icon: Icon(Icons.mail),
                          label: 'Messages',
                        ),
                        BottomNavigationBarItem(
                          icon: Icon(Icons.person),
                          label: 'Profile',
                        )
                      ],
                    ),
            ),
  </code></pre>