From bc88d0b9ed8c97550316b8e9ecdb7deae4529051 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 16 Apr 2024 15:10:54 -0700 Subject: [PATCH] Remove checked mode references (#146845) Fixes https://github.com/flutter/flutter/issues/21066 --- packages/flutter/lib/src/rendering/box.dart | 2 +- packages/flutter/lib/src/rendering/object.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/flutter/lib/src/rendering/box.dart b/packages/flutter/lib/src/rendering/box.dart index 623eaafb70..b33591c500 100644 --- a/packages/flutter/lib/src/rendering/box.dart +++ b/packages/flutter/lib/src/rendering/box.dart @@ -1522,7 +1522,7 @@ abstract class RenderBox extends RenderObject { assert(RenderObject.debugCheckingIntrinsics || !debugDoingThisResize); // performResize should not depend on anything except the incoming constraints bool shouldCache = true; assert(() { - // we don't want the checked-mode intrinsic tests to affect + // we don't want the debug-mode intrinsic tests to affect // who gets marked dirty, etc. shouldCache = !RenderObject.debugCheckingIntrinsics; return true; diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index c1b625ff03..3a3415bd7f 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -2205,11 +2205,11 @@ abstract class RenderObject with DiagnosticableTreeMixin implements HitTestTarge } Constraints? _constraints; - /// Verify that the object's constraints are being met. Override - /// this function in a subclass to verify that your state matches - /// the constraints object. This function is only called in checked - /// mode and only when needsLayout is false. If the constraints are - /// not met, it should assert or throw an exception. + /// Verify that the object's constraints are being met. Override this function + /// in a subclass to verify that your state matches the constraints object. + /// This function is only called when asserts are enabled (i.e. in debug mode) + /// and only when needsLayout is false. If the constraints are not met, it + /// should assert or throw an exception. @protected void debugAssertDoesMeetConstraints();