Flutter sliver container

niegus picture niegus · Feb 16, 2019 · Viewed 8.2k times · Source

I'm new to flutter and I'm not able to achieve the layout I want.

I have one sliverAppBar with 3 tabs. The content of one of the tabs has to be a ScrollView compound by one container with fixed size(with an image as background) and a ListView.

I've tried to do this with a CustomScrollView but I don't know how to create the container as it is not a sliver.

Can you point me in the right direction?

Regards, Diego.

Answer

anmol.majhail picture anmol.majhail · Feb 16, 2019

You can simply use SliverToBoxAdapter :

SliverToBoxAdapter( 
    child: Container(..),
)