MouseTracker no longer requires annotations attached#48453
Merged
fluttergithubbot merged 21 commits intoflutter:masterfrom Jan 28, 2020
Merged
MouseTracker no longer requires annotations attached#48453fluttergithubbot merged 21 commits intoflutter:masterfrom
fluttergithubbot merged 21 commits intoflutter:masterfrom
Conversation
This was referenced Jan 9, 2020
goderbauer
reviewed
Jan 13, 2020
Member
goderbauer
left a comment
There was a problem hiding this comment.
/cc @gspencergoog Can you review this?
Member
|
Looks like Cirrus is unhappy. |
Caused by making MouseRegion stateful
This was referenced Jan 22, 2020
1ad1943 to
8ba9161
Compare
8ba9161 to
b12abcc
Compare
| /// * A pointer that is hovering this widget has been removed. | ||
| /// * A pointer that is hovering this widget has moved away. | ||
| /// | ||
| /// And is __not__ triggered by the following case, |
Contributor
There was a problem hiding this comment.
You could just eliminate the bullet (since there's only one now), and say "And is __not__ triggered when this widget disappears while being hovered over."
Contributor
Author
There was a problem hiding this comment.
The reason for the bullet is to make the 4 cases aligned, so that it's obvious that all cases have been enumerated. I still prefer keeping the bullets.
dkwingsmt
commented
Jan 27, 2020
Contributor
|
This pull request is not suitable for automatic merging in its current state.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
In this PR,
MouseTrackerno longer provides API to attach, detach, and query the attachment of annotations. Render objects that useMouseTrackerAnnotationno longer need to attach or detach annotations during their lifecycles, simplifying the logic.Previously,
MouseTrackerAnnotation.onExit,RenderMouseRegionandMouseRegionpreventonExitfrom being executed when the owner is detached. Now this mechanism is removed from the previous two, and is only kept inMouseRegion. This decision is because this mechanism was aimed to prevent exceptions thrown fromState, therefore this mechanism should only been done at Widget/Element layer.This PR also:
Related Issues
Replace this paragraph with a list of issues related to this PR from our issue database. Indicate, which of these issues are resolved or fixed by this PR. There should be at least one issue listed here.
Tests
I added the following tests:
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.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.