'How i can hide and show app bar with animation flutter

Here is my code

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

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



Solution 1:[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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 LearnFlutter