_markNeedsClip() when clipper type has changed. (#18248)
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.
This commit is contained in:
parent
fc5d44d7ac
commit
0a26ac0970
@ -154,11 +154,5 @@ class _BottomAppBarClipper extends CustomClipper<Path> {
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldReclip(CustomClipper<Path> oldClipper) {
|
||||
if (oldClipper.runtimeType != _BottomAppBarClipper)
|
||||
return true;
|
||||
|
||||
final _BottomAppBarClipper typedOldClipper = oldClipper;
|
||||
return typedOldClipper.geometry != geometry;
|
||||
}
|
||||
bool shouldReclip(_BottomAppBarClipper oldClipper) => oldClipper.geometry != geometry;
|
||||
}
|
||||
|
@ -1106,7 +1106,7 @@ abstract class _RenderCustomClip<T> extends RenderProxyBox {
|
||||
_clipper = newClipper;
|
||||
assert(newClipper != null || oldClipper != null);
|
||||
if (newClipper == null || oldClipper == null ||
|
||||
oldClipper.runtimeType != oldClipper.runtimeType ||
|
||||
newClipper.runtimeType != oldClipper.runtimeType ||
|
||||
newClipper.shouldReclip(oldClipper)) {
|
||||
_markNeedsClip();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user