Skip to content

Conversation

@shihaohong
Copy link
Contributor

@shihaohong shihaohong commented Apr 17, 2020

Description

Removes the temporary flag, making the offset fix the default and only behavior for SnackBarBehavior.floating.

Part 1: #50597
Part 2: #54985

Related Issues

Fixes #47202
Fixes #43716

Screenshots

Before fix

After fix

Migration guide

  1. Set all instances of Scaffold.shouldSnackBarIgnoreFABRect to true after this PR is merged.
  2. Fix all failing tests. There are likely two main types:
    a) Fix all golden tests to expect the new change.
    b) Fix any widget tests that expect the SnackBar to appear higher than it should. The difference should simply be the size of the floating action button's rect.
  3. Once Scaffold.shouldSnackBarIgnoreFABRect is set to true by default (in a subsequent PR), remove the parameter from all instances of Scaffold.

Tests

n/a, but in hindsight, I should have added some tests testing the previous offset behavior so ensure that the removed behavior is properly documented somewhere.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@shihaohong shihaohong added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Apr 17, 2020
@shihaohong shihaohong requested a review from HansMuller April 17, 2020 20:53
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

@shihaohong shihaohong merged commit fc7ce3e into flutter:master Apr 17, 2020
@shihaohong shihaohong deleted the snackbar-default branch April 17, 2020 23:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 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.

Floating Snackbar has clipped shadow Floating snackbar wrong placement

3 participants