Unverified Commit e8af40f0 authored by Darren Austin's avatar Darren Austin Committed by GitHub

Fix `ColorScheme.shadow` to default to black even for dark themes. (#99722)

parent 010910f7
......@@ -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
......
......@@ -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);
......
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