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
e8af40f0
Unverified
Commit
e8af40f0
authored
Mar 09, 2022
by
Darren Austin
Committed by
GitHub
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `ColorScheme.shadow` to default to black even for dark themes. (#99722)
parent
010910f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
color_scheme.dart
packages/flutter/lib/src/material/color_scheme.dart
+1
-1
color_scheme_test.dart
packages/flutter/test/material/color_scheme_test.dart
+4
-4
No files found.
packages/flutter/lib/src/material/color_scheme.dart
View file @
e8af40f0
...
...
@@ -708,7 +708,7 @@ class ColorScheme with Diagnosticable {
final
Color
?
_shadow
;
/// A color use to paint the drop shadows of elevated components.
Color
get
shadow
=>
_shadow
??
onBackground
;
Color
get
shadow
=>
_shadow
??
const
Color
(
0xff000000
)
;
final
Color
?
_inverseSurface
;
/// A surface color used for displaying the reverse of what’s seen in the
...
...
packages/flutter/test/material/color_scheme_test.dart
View file @
e8af40f0
...
...
@@ -36,7 +36,7 @@ void main() {
expect
(
scheme
.
surfaceVariant
,
scheme
.
surface
);
expect
(
scheme
.
onSurfaceVariant
,
scheme
.
onSurface
);
expect
(
scheme
.
outline
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
const
Color
(
0xff000000
)
);
expect
(
scheme
.
inverseSurface
,
scheme
.
onSurface
);
expect
(
scheme
.
onInverseSurface
,
scheme
.
surface
);
expect
(
scheme
.
inversePrimary
,
scheme
.
onPrimary
);
...
...
@@ -75,7 +75,7 @@ void main() {
expect
(
scheme
.
surfaceVariant
,
scheme
.
surface
);
expect
(
scheme
.
onSurfaceVariant
,
scheme
.
onSurface
);
expect
(
scheme
.
outline
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
const
Color
(
0xff000000
)
);
expect
(
scheme
.
inverseSurface
,
scheme
.
onSurface
);
expect
(
scheme
.
onInverseSurface
,
scheme
.
surface
);
expect
(
scheme
.
inversePrimary
,
scheme
.
onPrimary
);
...
...
@@ -114,7 +114,7 @@ void main() {
expect
(
scheme
.
surfaceVariant
,
scheme
.
surface
);
expect
(
scheme
.
onSurfaceVariant
,
scheme
.
onSurface
);
expect
(
scheme
.
outline
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
const
Color
(
0xff000000
)
);
expect
(
scheme
.
inverseSurface
,
scheme
.
onSurface
);
expect
(
scheme
.
onInverseSurface
,
scheme
.
surface
);
expect
(
scheme
.
inversePrimary
,
scheme
.
onPrimary
);
...
...
@@ -153,7 +153,7 @@ void main() {
expect
(
scheme
.
surfaceVariant
,
scheme
.
surface
);
expect
(
scheme
.
onSurfaceVariant
,
scheme
.
onSurface
);
expect
(
scheme
.
outline
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
scheme
.
onBackground
);
expect
(
scheme
.
shadow
,
const
Color
(
0xff000000
)
);
expect
(
scheme
.
inverseSurface
,
scheme
.
onSurface
);
expect
(
scheme
.
onInverseSurface
,
scheme
.
surface
);
expect
(
scheme
.
inversePrimary
,
scheme
.
onPrimary
);
...
...
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