@@ -66,11 +66,7 @@ class BorderSide with Diagnosticable {
6666 this .width = 1.0 ,
6767 this .style = BorderStyle .solid,
6868 this .strokeAlign = strokeAlignInside,
69- }) : assert (color != null ),
70- assert (width != null ),
71- assert (width >= 0.0 ),
72- assert (style != null ),
73- assert (strokeAlign != null );
69+ }) : assert (width >= 0.0 );
7470
7571 /// Creates a [BorderSide] that represents the addition of the two given
7672 /// [BorderSide] s.
@@ -84,8 +80,6 @@ class BorderSide with Diagnosticable {
8480 ///
8581 /// The arguments must not be null.
8682 static BorderSide merge (BorderSide a, BorderSide b) {
87- assert (a != null );
88- assert (b != null );
8983 assert (canMerge (a, b));
9084 final bool aIsNone = a.style == BorderStyle .none && a.width == 0.0 ;
9185 final bool bIsNone = b.style == BorderStyle .none && b.width == 0.0 ;
@@ -202,7 +196,6 @@ class BorderSide with Diagnosticable {
202196 /// Values for `t` are usually obtained from an [Animation<double>] , such as
203197 /// an [AnimationController] .
204198 BorderSide scale (double t) {
205- assert (t != null );
206199 return BorderSide (
207200 color: color,
208201 width: math.max (0.0 , width * t),
@@ -239,8 +232,6 @@ class BorderSide with Diagnosticable {
239232 ///
240233 /// The arguments must not be null.
241234 static bool canMerge (BorderSide a, BorderSide b) {
242- assert (a != null );
243- assert (b != null );
244235 if ((a.style == BorderStyle .none && a.width == 0.0 ) ||
245236 (b.style == BorderStyle .none && b.width == 0.0 )) {
246237 return true ;
@@ -255,9 +246,6 @@ class BorderSide with Diagnosticable {
255246 ///
256247 /// {@macro dart.ui.shadow.lerp}
257248 static BorderSide lerp (BorderSide a, BorderSide b, double t) {
258- assert (a != null );
259- assert (b != null );
260- assert (t != null );
261249 if (t == 0.0 ) {
262250 return a;
263251 }
@@ -517,7 +505,6 @@ abstract class ShapeBorder {
517505 ///
518506 /// {@macro dart.ui.shadow.lerp}
519507 static ShapeBorder ? lerp (ShapeBorder ? a, ShapeBorder ? b, double t) {
520- assert (t != null );
521508 ShapeBorder ? result;
522509 if (b != null ) {
523510 result = b.lerpFrom (a, t);
@@ -664,7 +651,7 @@ abstract class OutlinedBorder extends ShapeBorder {
664651 /// const constructors so that they can be used in const expressions.
665652 ///
666653 /// The value of [side] must not be null.
667- const OutlinedBorder ({ this .side = BorderSide .none }) : assert (side != null ) ;
654+ const OutlinedBorder ({ this .side = BorderSide .none });
668655
669656 @override
670657 EdgeInsetsGeometry get dimensions => EdgeInsets .all (math.max (side.strokeInset, 0 ));
@@ -707,7 +694,6 @@ abstract class OutlinedBorder extends ShapeBorder {
707694 ///
708695 /// {@macro dart.ui.shadow.lerp}
709696 static OutlinedBorder ? lerp (OutlinedBorder ? a, OutlinedBorder ? b, double t) {
710- assert (t != null );
711697 ShapeBorder ? result;
712698 if (b != null ) {
713699 result = b.lerpFrom (a, t);
@@ -724,8 +710,7 @@ abstract class OutlinedBorder extends ShapeBorder {
724710/// The borders are listed from the outside to the inside.
725711class _CompoundBorder extends ShapeBorder {
726712 _CompoundBorder (this .borders)
727- : assert (borders != null ),
728- assert (borders.length >= 2 ),
713+ : assert (borders.length >= 2 ),
729714 assert (! borders.any ((ShapeBorder border) => border is _CompoundBorder ));
730715
731716 final List <ShapeBorder > borders;
@@ -788,7 +773,6 @@ class _CompoundBorder extends ShapeBorder {
788773 }
789774
790775 static _CompoundBorder lerp (ShapeBorder ? a, ShapeBorder ? b, double t) {
791- assert (t != null );
792776 assert (a is _CompoundBorder || b is _CompoundBorder ); // Not really necessary, but all call sites currently intend this.
793777 final List <ShapeBorder ?> aList = a is _CompoundBorder ? a.borders : < ShapeBorder ? > [a];
794778 final List <ShapeBorder ?> bList = b is _CompoundBorder ? b.borders : < ShapeBorder ? > [b];
@@ -897,12 +881,6 @@ void paintBorder(
897881 BorderSide bottom = BorderSide .none,
898882 BorderSide left = BorderSide .none,
899883}) {
900- assert (canvas != null );
901- assert (rect != null );
902- assert (top != null );
903- assert (right != null );
904- assert (bottom != null );
905- assert (left != null );
906884
907885 // We draw the borders as filled shapes, unless the borders are hairline
908886 // borders, in which case we use PaintingStyle.stroke, with the stroke width
0 commit comments