Skip to content

Conversation

@goderbauer
Copy link
Member

Fixes #25993.
Follow-up to #25051.

@goderbauer

This comment has been minimized.

// 1 | 0 | 0 || 1.0
// 1 | 0 | 1 || 1.0
// 1 | 1 | 0 || 1.0
// 1 | 1 | 1 || fade
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@fkorotkov

This comment has been minimized.

@zoechi zoechi added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jan 4, 2019
Copy link
Contributor

@GaryQian GaryQian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

final double toolbarOpacity = pinned ? 1.0
: ((visibleMainHeight - _bottomHeight) / kToolbarHeight).clamp(0.0, 1.0);

// Truth table for `toolbarOpacity`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the result is fade when pinned=false and 1.0 when pinned=true except with one exception (the last row). Aha: I see that the implementation boils it down nicely:

!pinned || (floating && bottom != null)

@goderbauer goderbauer merged commit d8b57c2 into flutter:master Jan 7, 2019
@goderbauer goderbauer deleted the fixAppbarOpacityFade branch January 7, 2019 17:42
JediBurrell pushed a commit to JediBurrell/flutter that referenced this pull request Jan 8, 2019
kangwang1988 pushed a commit to XianyuTech/flutter that referenced this pull request Feb 12, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Title of pinned, floating SliverAppBar not fading out with "bottom"

7 participants