I really love using Slivers, but really have a Problem with SliverAppBar: usually, I use the SliverAppBar Widget for creating a AppBar that has a Background Image with the Parallax effect. So all I use is the flexible space, which unfortunately gets blocked by the AppBar Portion whenever you scroll down. I tried making the AppBar portion transparent by setting the color value to transparent, but all it does is make the whole thing, including the flexiblespace, transparent..
Is there a way to use only the flexiblespace of a SliverAppBar without fading in the AppBar portion when scrolling down?
here is the code I use:
SliverAppBar(
expandedHeight: 220,
pinned: false,
forceElevated: true,
backgroundColor: Colors.transparent,
stretch: true,
leading: Container(),
flexibleSpace: FlexibleSpaceBar(
collapseMode: CollapseMode.pin,
background:Stack(
children: <Widget>[
Image(
fit: BoxFit.cover,
width: MediaQuery.of(context).size.width,
image: AssetImage('assets/images/image2.png'),
),
Positioned(
bottom: 0,
child: Container(
height: 110,
width: MediaQuery.of(context).size.width,
color: Colors.grey,
),
),
Positioned(
bottom: 10,
left: 10,
child: CircleAvatar(
radius: 45,
backgroundImage: AssetImage('assets/images/image.png'),
),
),
Positioned(
bottom: 77,
left: 110,
child: Container(
width: MediaQuery.of(context).size.width -110 -60,
child: Text(
'Name...',
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
fontSize: 20,
color: Colors.white
),
),
),
),
Positioned(
bottom: 63,
left: 110,
child: Container(
width: MediaQuery.of(context).size.width -110 -60,
child: Text(
'description...',
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
fontSize: 14,
color: Colors.white70
),
),
),
),
Positioned(
bottom: 5,
left: 110,
child: Container(
width: MediaQuery.of(context).size.width-110,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
],
),
),
),
],
),
),
),
Hope these Images help explain my problem: The flexiblespace looks as follows:Image 1 but once you scroll down, the flexible space fades away as seen in this picture:Image 2 I don't want to flexiblespace to fade away.