@@ -96,10 +96,7 @@ class BoxConstraints extends Constraints {
9696 this .maxWidth = double .infinity,
9797 this .minHeight = 0.0 ,
9898 this .maxHeight = double .infinity,
99- }) : assert (minWidth != null ),
100- assert (maxWidth != null ),
101- assert (minHeight != null ),
102- assert (maxHeight != null );
99+ });
103100
104101 /// Creates box constraints that is respected only by the given size.
105102 BoxConstraints .tight (Size size)
@@ -190,7 +187,6 @@ class BoxConstraints extends Constraints {
190187
191188 /// Returns new box constraints that are smaller by the given edge dimensions.
192189 BoxConstraints deflate (EdgeInsets edges) {
193- assert (edges != null );
194190 assert (debugAssertIsValid ());
195191 final double horizontal = edges.horizontal;
196192 final double vertical = edges.vertical;
@@ -472,7 +468,6 @@ class BoxConstraints extends Constraints {
472468 ///
473469 /// {@macro dart.ui.shadow.lerp}
474470 static BoxConstraints ? lerp (BoxConstraints ? a, BoxConstraints ? b, double t) {
475- assert (t != null );
476471 if (a == null && b == null ) {
477472 return null ;
478473 }
@@ -762,8 +757,6 @@ class BoxHitTestResult extends HitTestResult {
762757 required Offset position,
763758 required BoxHitTest hitTest,
764759 }) {
765- assert (position != null );
766- assert (hitTest != null );
767760 if (transform != null ) {
768761 transform = Matrix4 .tryInvert (PointerEvent .removePerspectiveTransform (transform));
769762 if (transform == null ) {
@@ -801,8 +794,6 @@ class BoxHitTestResult extends HitTestResult {
801794 required Offset position,
802795 required BoxHitTest hitTest,
803796 }) {
804- assert (position != null );
805- assert (hitTest != null );
806797 final Offset transformedPosition = offset == null ? position : position - offset;
807798 if (offset != null ) {
808799 pushOffset (- offset);
@@ -838,9 +829,6 @@ class BoxHitTestResult extends HitTestResult {
838829 required Offset position,
839830 required BoxHitTest hitTest,
840831 }) {
841- assert (position != null );
842- assert (hitTest != null );
843- assert (position != null );
844832 final Offset transformedPosition = transform == null ?
845833 position : MatrixUtils .transformPoint (transform, position);
846834 if (transform != null ) {
@@ -887,7 +875,6 @@ class BoxHitTestResult extends HitTestResult {
887875 Matrix4 ? rawTransform,
888876 required BoxHitTestWithOutOfBandPosition hitTest,
889877 }) {
890- assert (hitTest != null );
891878 assert (
892879 (paintOffset == null && paintTransform == null && rawTransform != null ) ||
893880 (paintOffset == null && paintTransform != null && rawTransform == null ) ||
@@ -915,8 +902,7 @@ class BoxHitTestEntry extends HitTestEntry<RenderBox> {
915902 /// Creates a box hit test entry.
916903 ///
917904 /// The [localPosition] argument must not be null.
918- BoxHitTestEntry (super .target, this .localPosition)
919- : assert (localPosition != null );
905+ BoxHitTestEntry (super .target, this .localPosition);
920906
921907 /// The position of the hit test in the local coordinates of [target] .
922908 final Offset localPosition;
@@ -1452,13 +1438,6 @@ abstract class RenderBox extends RenderObject {
14521438 @mustCallSuper
14531439 double getMinIntrinsicWidth (double height) {
14541440 assert (() {
1455- if (height == null ) {
1456- throw FlutterError .fromParts (< DiagnosticsNode > [
1457- ErrorSummary ('The height argument to getMinIntrinsicWidth was null.' ),
1458- ErrorDescription ('The argument to getMinIntrinsicWidth must not be negative or null.' ),
1459- ErrorHint ('If you do not have a specific height in mind, then pass double.infinity instead.' ),
1460- ]);
1461- }
14621441 if (height < 0.0 ) {
14631442 throw FlutterError .fromParts (< DiagnosticsNode > [
14641443 ErrorSummary ('The height argument to getMinIntrinsicWidth was negative.' ),
@@ -1601,13 +1580,6 @@ abstract class RenderBox extends RenderObject {
16011580 @mustCallSuper
16021581 double getMaxIntrinsicWidth (double height) {
16031582 assert (() {
1604- if (height == null ) {
1605- throw FlutterError .fromParts (< DiagnosticsNode > [
1606- ErrorSummary ('The height argument to getMaxIntrinsicWidth was null.' ),
1607- ErrorDescription ('The argument to getMaxIntrinsicWidth must not be negative or null.' ),
1608- ErrorHint ('If you do not have a specific height in mind, then pass double.infinity instead.' ),
1609- ]);
1610- }
16111583 if (height < 0.0 ) {
16121584 throw FlutterError .fromParts (< DiagnosticsNode > [
16131585 ErrorSummary ('The height argument to getMaxIntrinsicWidth was negative.' ),
@@ -1684,13 +1656,6 @@ abstract class RenderBox extends RenderObject {
16841656 @mustCallSuper
16851657 double getMinIntrinsicHeight (double width) {
16861658 assert (() {
1687- if (width == null ) {
1688- throw FlutterError .fromParts (< DiagnosticsNode > [
1689- ErrorSummary ('The width argument to getMinIntrinsicHeight was null.' ),
1690- ErrorDescription ('The argument to getMinIntrinsicHeight must not be negative or null.' ),
1691- ErrorHint ('If you do not have a specific width in mind, then pass double.infinity instead.' ),
1692- ]);
1693- }
16941659 if (width < 0.0 ) {
16951660 throw FlutterError .fromParts (< DiagnosticsNode > [
16961661 ErrorSummary ('The width argument to getMinIntrinsicHeight was negative.' ),
@@ -1766,13 +1731,6 @@ abstract class RenderBox extends RenderObject {
17661731 @mustCallSuper
17671732 double getMaxIntrinsicHeight (double width) {
17681733 assert (() {
1769- if (width == null ) {
1770- throw FlutterError .fromParts (< DiagnosticsNode > [
1771- ErrorSummary ('The width argument to getMaxIntrinsicHeight was null.' ),
1772- ErrorDescription ('The argument to getMaxIntrinsicHeight must not be negative or null.' ),
1773- ErrorHint ('If you do not have a specific width in mind, then pass double.infinity instead.' ),
1774- ]);
1775- }
17761734 if (width < 0.0 ) {
17771735 throw FlutterError .fromParts (< DiagnosticsNode > [
17781736 ErrorSummary ('The width argument to getMaxIntrinsicHeight was negative.' ),
@@ -2253,7 +2211,6 @@ abstract class RenderBox extends RenderObject {
22532211
22542212 @override
22552213 void debugAssertDoesMeetConstraints () {
2256- assert (constraints != null );
22572214 assert (() {
22582215 if (! hasSize) {
22592216 final DiagnosticsNode contract;
@@ -2582,7 +2539,6 @@ abstract class RenderBox extends RenderObject {
25822539 /// child's [parentData] in the [BoxParentData.offset] field.
25832540 @override
25842541 void applyPaintTransform (RenderObject child, Matrix4 transform) {
2585- assert (child != null );
25862542 assert (child.parent == this );
25872543 assert (() {
25882544 if (child.parentData is ! BoxParentData ) {
0 commit comments