diff --git a/packages/flutter/lib/src/material/bottom_app_bar.dart b/packages/flutter/lib/src/material/bottom_app_bar.dart index b5c008c424..ad4ad563ef 100644 --- a/packages/flutter/lib/src/material/bottom_app_bar.dart +++ b/packages/flutter/lib/src/material/bottom_app_bar.dart @@ -154,11 +154,5 @@ class _BottomAppBarClipper extends CustomClipper { } @override - bool shouldReclip(CustomClipper oldClipper) { - if (oldClipper.runtimeType != _BottomAppBarClipper) - return true; - - final _BottomAppBarClipper typedOldClipper = oldClipper; - return typedOldClipper.geometry != geometry; - } + bool shouldReclip(_BottomAppBarClipper oldClipper) => oldClipper.geometry != geometry; } diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index 3e0c49901d..ecbaf6f0be 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart @@ -1106,7 +1106,7 @@ abstract class _RenderCustomClip 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(); }