37

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.

niegus
  • 1,698
  • 4
  • 22
  • 34

1 Answers1

113

You can simply use SliverToBoxAdapter :

SliverToBoxAdapter( 
    child: Container(..),
)
Augustin R
  • 7,089
  • 3
  • 26
  • 54
anmol.majhail
  • 48,256
  • 14
  • 136
  • 105
  • 1
    How can we do the reverse situation? put a sliver into a row/column? – Paloma Bispo Apr 24 '21 at 11:36
  • Paloma, I'd recommend either creating your own question for this or seeing if it has already been answered on Stackoverflow. Since questions should limit their scope to one topic or they become too broad and solutions become difficult to understand. Thanks. – James Apr 24 '21 at 17:50