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
7eeafb12
Unverified
Commit
7eeafb12
authored
Mar 25, 2022
by
Michael Goderbauer
Committed by
GitHub
Mar 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consider backgroundBlendMode in equality of BoxDecoration (#100788)
parent
ef8e3578
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
box_decoration.dart
packages/flutter/lib/src/painting/box_decoration.dart
+2
-0
box_decoration_test.dart
packages/flutter/test/painting/box_decoration_test.dart
+13
-0
No files found.
packages/flutter/lib/src/painting/box_decoration.dart
View file @
7eeafb12
...
...
@@ -320,6 +320,7 @@ class BoxDecoration extends Decoration {
&&
other
.
borderRadius
==
borderRadius
&&
listEquals
<
BoxShadow
>(
other
.
boxShadow
,
boxShadow
)
&&
other
.
gradient
==
gradient
&&
other
.
backgroundBlendMode
==
backgroundBlendMode
&&
other
.
shape
==
shape
;
}
...
...
@@ -331,6 +332,7 @@ class BoxDecoration extends Decoration {
borderRadius
,
boxShadow
==
null
?
null
:
Object
.
hashAll
(
boxShadow
!),
gradient
,
backgroundBlendMode
,
shape
,
);
...
...
packages/flutter/test/painting/box_decoration_test.dart
View file @
7eeafb12
...
...
@@ -95,4 +95,17 @@ void main() {
);
expect
(
clipPath
,
isLookLikeExpectedPath
);
});
test
(
'BoxDecorations with different blendModes are not equal'
,
()
{
// Regression test for https://github.com/flutter/flutter/issues/100754.
const
BoxDecoration
one
=
BoxDecoration
(
color:
Color
(
0x00000000
),
backgroundBlendMode:
BlendMode
.
color
,
);
const
BoxDecoration
two
=
BoxDecoration
(
color:
Color
(
0x00000000
),
backgroundBlendMode:
BlendMode
.
difference
,
);
expect
(
one
==
two
,
isFalse
);
});
}
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