Floating app bar above a list flutter || Flutter — Slivers and CustomScrollView

preview_player
Показать описание
To make it easier for users to view a list of items, you might want to hide the app bar as the user scrolls down the list. This is especially true if your app displays a “tall” app bar that occupies a lot of vertical space.

Typically, you create an app bar by providing an appBar property to the Scaffold widget. This creates a fixed app bar that always remains above the body of the Scaffold.

Moving the app bar from a Scaffold widget into a CustomScrollView allows you to create an app bar that scrolls offscreen as you scroll through a list of items contained inside the CustomScrollView.

This recipe demonstrates how to use a CustomScrollView to display a list of items with an app bar on top that scrolls offscreen as the user scrolls down the list using the following steps:

Create a CustomScrollView.
Use SliverAppBar to add a floating app bar.
Add a list of items using a SliverList.

#Flutter #Container #FlutterAppBar #Android #ios #widgets #dart #coder #programmer #coding #FloatingAppBar #AnimationAppBar #SliverList #CustomScrollView #SliverAppBar
Рекомендации по теме
visit shbcf.ru