Warn about the size setter. (#7729)

This commit is contained in:
Ian Hickson
2017-01-29 23:58:42 -08:00
committed by GitHub
parent a8ed018386
commit 6e30cae8fa

View File

@@ -1350,6 +1350,9 @@ abstract class RenderBox extends RenderObject {
}
Size _size;
@protected
/// Setting the size, in checked mode, triggers some analysis of the render box,
/// as implemented by [debugAssertDoesMeetConstraints], including calling the intrinsic
/// sizing methods and checking that they meet certain invariants.
set size(Size value) {
assert(!(debugDoingThisResize && debugDoingThisLayout));
assert(sizedByParent || !debugDoingThisResize);