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

This commit is contained in:
Darren Austin
2022-03-09 12:11:55 -08:00
committed by GitHub
parent 010910f71c
commit e8af40f06b
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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);