Unverified Commit 0b13f4b4 authored by Bruno Leroux's avatar Bruno Leroux Committed by GitHub

Fix BoxShadow toString() (#105696)

parent fc1710b4
......@@ -28,8 +28,8 @@ import 'debug.dart';
class BoxShadow extends ui.Shadow {
/// Creates a box shadow.
///
/// By default, the shadow is solid black with zero [offset], [blurRadius],
/// and [spreadRadius].
/// By default, the shadow is solid black with zero [offset], zero [blurRadius],
/// zero [spreadRadius], and [BlurStyle.normal].
const BoxShadow({
super.color,
super.offset,
......@@ -145,5 +145,5 @@ class BoxShadow extends ui.Shadow {
int get hashCode => Object.hash(color, offset, blurRadius, spreadRadius, blurStyle);
@override
String toString() => 'BoxShadow($color, $offset, ${debugFormatDouble(blurRadius)}, ${debugFormatDouble(spreadRadius)}), $blurStyle';
String toString() => 'BoxShadow($color, $offset, ${debugFormatDouble(blurRadius)}, ${debugFormatDouble(spreadRadius)}, $blurStyle)';
}
......@@ -147,8 +147,8 @@ void main() {
});
test('BoxShadow toString test', () {
expect(const BoxShadow(blurRadius: 4.0).toString(), equals('BoxShadow(Color(0xff000000), Offset(0.0, 0.0), 4.0, 0.0), BlurStyle.normal'));
expect(const BoxShadow(blurRadius: 4.0, blurStyle: BlurStyle.solid).toString(), equals('BoxShadow(Color(0xff000000), Offset(0.0, 0.0), 4.0, 0.0), BlurStyle.solid'));
expect(const BoxShadow(blurRadius: 4.0).toString(), equals('BoxShadow(Color(0xff000000), Offset(0.0, 0.0), 4.0, 0.0, BlurStyle.normal)'));
expect(const BoxShadow(blurRadius: 4.0, blurStyle: BlurStyle.solid).toString(), equals('BoxShadow(Color(0xff000000), Offset(0.0, 0.0), 4.0, 0.0, BlurStyle.solid)'));
});
testWidgets('BoxShadow BoxStyle.solid', (WidgetTester tester) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment