Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
0b13f4b4
Unverified
Commit
0b13f4b4
authored
Jun 09, 2022
by
Bruno Leroux
Committed by
GitHub
Jun 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BoxShadow toString() (#105696)
parent
fc1710b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
box_shadow.dart
packages/flutter/lib/src/painting/box_shadow.dart
+3
-3
box_painter_test.dart
packages/flutter/test/painting/box_painter_test.dart
+2
-2
No files found.
packages/flutter/lib/src/painting/box_shadow.dart
View file @
0b13f4b4
...
...
@@ -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
)
'
;
}
packages/flutter/test/painting/box_painter_test.dart
View file @
0b13f4b4
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment