问题
1. The Context
I'm trying to make a ListView
that has some empty space at the top so the user can bring top cards to the bottom of the screen, where she can easily access them with her thumb. As discussed in this other StackOverflow question, I couldn't make this happen with a regular ListView
, so I switched to its parent, a CustomScrollView
.
However, after adding a top SliverAppBar
, when I get close to collapsing it, the space blurs into darker shades of grey, as seen in the image below. How can I disable this effect?
2. The Code
The `SliverAppBar I'm using so far is:
SliverAppBar(
automaticallyImplyLeading: false, // gets rid of the back arrow
expandedHeight: 250, // the collapsible space you want to use
flexibleSpace: FlexibleSpaceBar(
background: Container(
color: Colors.transparent
),
),
),
I've also tried to modify my flexibleSpace: FlexibleSpaceBar
, but it didn't seem to work:
flexibleSpace: FlexibleSpaceBar(
title: AnimatedOpacity(
opacity: 0.0,
duration: Duration(seconds: 1),
),
collapseMode: CollapseMode.none,
stretchModes: [
StretchMode.fadeTitle,
],
background: Container(color: Colors.grey[850]),
),
来源:https://stackoverflow.com/questions/58884360/how-to-disable-the-blur-effect-when-collapsing-a-sliverappbar-in-a-customscro