Skip to content

Conversation

@ravenblackx
Copy link

Description

Changed ValueNotifier to use identical() rather than operator== to determine whether to notify listeners of a change.

Related Issues

#29922

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.
  • My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA. (Google Corporate CLA.)
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Uncertain - this may break something if someone relies on the surprising behavior. I'm inclined to doubt that anyone relies on the surprising behavior.
  • Yes, this is a breaking change (Please read Handling breaking changes).
  • No, this is not a breaking change.

@goderbauer goderbauer added the framework flutter/packages/flutter repository. See also f: labels. label Mar 25, 2019
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.

Thanks for contributing a fix! In this case changing the meaning of ValueNotifier wouldn't be a backwards compatible change. The ValueNotifier API doc should really explain that the listeners are notified when the new value is not == to the old value; currently it just says that notifications happen when the value is "replaced".

If you'd be willing to change this PR into a doc change, I can help land it.

Thanks!

@goderbauer
Copy link
Member

Created #30461 to make the docs more specific on this one.

@goderbauer goderbauer closed this Apr 3, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants