0

Here is my code

return Scaffold(
          body: SafeArea(
            appBar:getIsShowAppBar(layoutProvider.currentIndex, 
              realEstatesProvider) ? AppBar (),

            child: IndexedStack(
                children: layoutProvider.screens,
                index: layoutProvider.currentIndex),
          ),
          bottomNavigationBar: BottomNavigationBar(), );

Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56
  • Can you describe more about your code, what went wrong while running current code? What and how you like to switch visibility ? – Md. Yeasin Sheikh Feb 17 '22 at 14:14
  • Try This : https://stackoverflow.com/a/65960645/15732885 – Fuad Saneen Feb 17 '22 at 15:58
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 21 '22 at 13:39

1 Answers1

-1

If you want to show an app bar and hide it when you want you would want to use the SliverAppBar widget witch allows you to make an app bar of your choice and allows to dissapear it when scrolling and other options with animations. https://api.flutter.dev/flutter/material/SliverAppBar-class.html

LearnFlutter
  • 214
  • 2
  • 22