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.

1. Create a CustomScrollView

To create a floating app bar, place the app bar inside a
CustomScrollView that also contains the list of items.
This synchronizes the scroll position of the app bar and the list of items.
You might think of the CustomScrollView widget as a ListView
that allows you to mix and match different types of scrollable lists
and widgets together.