-
Notifications
You must be signed in to change notification settings - Fork 28.8k
_markNeedsClip() when clipper type has changed. #18248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A bug in _RenderCustomClip was compaeing the type of oldClipper to itself instead to the type of newClipper. This was the root cause for the crash flutter#14937 worked around. This also reverts the workaround introduced in flutter#14937.
@@ -155,9 +155,6 @@ class _BottomAppBarClipper extends CustomClipper<Path> { | |||
|
|||
@override | |||
bool shouldReclip(CustomClipper<Path> oldClipper) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can make the argument type _BottomAppBarClipper
here, I believe the superclass explicitly makes it covariant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -155,9 +155,6 @@ class _BottomAppBarClipper extends CustomClipper<Path> { | |||
|
|||
@override | |||
bool shouldReclip(CustomClipper<Path> oldClipper) { | |||
if (oldClipper.runtimeType != _BottomAppBarClipper) | |||
return true; | |||
|
|||
final _BottomAppBarClipper typedOldClipper = oldClipper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would also let you get rid of this line, and could indeed turn the whole method into a one-liner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
'toggle has notch' in bottom_app_bar_test is covering the bug |
A bug in _RenderCustomClip was compaeing the type of oldClipper to
itself instead to the type of newClipper.
This was the root cause for the crash #14937 worked around.
This also reverts the workaround introduced in #14937.