Unverified Commit 3af97d22 authored by chunhtai's avatar chunhtai Committed by GitHub

Fix the flexible space bar to still create a rendering object even if… (#62690)

parent 6ab558d8
......@@ -303,7 +303,6 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
const double fadeEnd = 1.0;
assert(fadeStart <= fadeEnd);
final double opacity = 1.0 - Interval(fadeStart, fadeEnd).transform(t);
if (opacity > 0.0) {
double height = settings.maxExtent;
// StretchMode.zoomBackground
......@@ -311,13 +310,15 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
constraints.maxHeight > height) {
height = constraints.maxHeight;
}
children.add(Positioned(
top: _getCollapsePadding(t, settings),
left: 0.0,
right: 0.0,
height: height,
child: Opacity(
// IOS is relying on this semantics node to correctly traverse
// through the app bar when it is collapsed.
alwaysIncludeSemantics: true,
opacity: opacity,
child: widget.background,
),
......@@ -340,7 +341,6 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
));
}
}
}
// title
if (widget.title != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment