Clip Behavior

Summary

Context

Migration guide

Timeline

References

Summary

Flutter now defaults to not clip except for a few specialized widgets
(such as ClipRect). To override the no-clip default,
explicitly set clipBehavior in widgets constructions.

Context

Flutter used to be slow because of clips. For example,
the Flutter gallery app benchmark had an average frame
rasterization time of about 35ms in May 2018,
where the budget for smooth 60fps rendering is 16ms.
By removing unnecessary clips and their related operations,
we saw an almost 2x speedup from 35ms/frame to 17.5ms/frame.

Issue 18057. Such behaviors were universal to
material apps through widgets like