diff --git a/lib/web_ui/lib/src/ui/painting.dart b/lib/web_ui/lib/src/ui/painting.dart index 85e2224c3c25f..65795e8df1c94 100644 --- a/lib/web_ui/lib/src/ui/painting.dart +++ b/lib/web_ui/lib/src/ui/painting.dart @@ -275,11 +275,7 @@ class Color { @override String toString() { - if (engine.assertionsEnabled) { - return 'Color(0x${value.toRadixString(16).padLeft(8, '0')})'; - } else { - return super.toString(); - } + return 'Color(0x${value.toRadixString(16).padLeft(8, '0')})'; } } @@ -1192,36 +1188,32 @@ class Paint { @override String toString() { - if (engine.assertionsEnabled) { - final StringBuffer result = StringBuffer(); - String semicolon = ''; - result.write('Paint('); - if (style == PaintingStyle.stroke) { - result.write('$style'); - if (strokeWidth != null && strokeWidth != 0.0) - result.write(' $strokeWidth'); - else - result.write(' hairline'); - if (strokeCap != null && strokeCap != StrokeCap.butt) - result.write(' $strokeCap'); - semicolon = '; '; - } - if (isAntiAlias != true) { - result.write('${semicolon}antialias off'); - semicolon = '; '; - } - if (color != _defaultPaintColor) { - if (color != null) - result.write('$semicolon$color'); - else - result.write('${semicolon}no color'); - semicolon = '; '; - } - result.write(')'); - return result.toString(); - } else { - return super.toString(); + final StringBuffer result = StringBuffer(); + String semicolon = ''; + result.write('Paint('); + if (style == PaintingStyle.stroke) { + result.write('$style'); + if (strokeWidth != null && strokeWidth != 0.0) + result.write(' $strokeWidth'); + else + result.write(' hairline'); + if (strokeCap != null && strokeCap != StrokeCap.butt) + result.write(' $strokeCap'); + semicolon = '; '; + } + if (isAntiAlias != true) { + result.write('${semicolon}antialias off'); + semicolon = '; '; + } + if (color != _defaultPaintColor) { + if (color != null) + result.write('$semicolon$color'); + else + result.write('${semicolon}no color'); + semicolon = '; '; } + result.write(')'); + return result.toString(); } } @@ -1447,9 +1439,7 @@ class ColorFilter { } @override - String toString() => engine.assertionsEnabled - ? 'ColorFilter($_color, $_blendMode)' - : super.toString(); + String toString() => 'ColorFilter($_color, $_blendMode)'; } /// Styles to use for blurs in [MaskFilter] objects. diff --git a/lib/web_ui/lib/src/ui/text.dart b/lib/web_ui/lib/src/ui/text.dart index 9d8ea673ddecb..a42b7e7edc3ce 100644 --- a/lib/web_ui/lib/src/ui/text.dart +++ b/lib/web_ui/lib/src/ui/text.dart @@ -793,10 +793,7 @@ class TextBox { @override String toString() { - if (engine.assertionsEnabled) { - return 'TextBox.fromLTRBD(${left.toStringAsFixed(1)}, ${top.toStringAsFixed(1)}, ${right.toStringAsFixed(1)}, ${bottom.toStringAsFixed(1)}, $direction)'; - } - return super.toString(); + return 'TextBox.fromLTRBD(${left.toStringAsFixed(1)}, ${top.toStringAsFixed(1)}, ${right.toStringAsFixed(1)}, ${bottom.toStringAsFixed(1)}, $direction)'; } }