Default toggleableActiveColor to accentColor if not set (#17848)
This commit is contained in:
parent
41fb069cb7
commit
66b50ed02b
@ -114,8 +114,8 @@ class ThemeData extends Diagnosticable {
|
|||||||
primaryColorLight ??= isDark ? Colors.grey[500] : primarySwatch[100];
|
primaryColorLight ??= isDark ? Colors.grey[500] : primarySwatch[100];
|
||||||
primaryColorDark ??= isDark ? Colors.black : primarySwatch[700];
|
primaryColorDark ??= isDark ? Colors.black : primarySwatch[700];
|
||||||
final bool primaryIsDark = primaryColorBrightness == Brightness.dark;
|
final bool primaryIsDark = primaryColorBrightness == Brightness.dark;
|
||||||
|
toggleableActiveColor ??= isDark ? Colors.tealAccent[200] : (accentColor ?? primarySwatch[600]);
|
||||||
accentColor ??= isDark ? Colors.tealAccent[200] : primarySwatch[500];
|
accentColor ??= isDark ? Colors.tealAccent[200] : primarySwatch[500];
|
||||||
toggleableActiveColor ??= isDark ? Colors.tealAccent[200] : primarySwatch[600];
|
|
||||||
accentColorBrightness ??= estimateBrightnessForColor(accentColor);
|
accentColorBrightness ??= estimateBrightnessForColor(accentColor);
|
||||||
final bool accentIsDark = accentColorBrightness == Brightness.dark;
|
final bool accentIsDark = accentColorBrightness == Brightness.dark;
|
||||||
canvasColor ??= isDark ? Colors.grey[850] : Colors.grey[50];
|
canvasColor ??= isDark ? Colors.grey[850] : Colors.grey[50];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user