Increase hint text contrast ratio to 4.5 (#15504)
This commit is contained in:
parent
e568178de5
commit
d671267a20
@ -2305,31 +2305,18 @@ class InputDecorationTheme extends Diagnosticable {
|
|||||||
void debugFillProperties(DiagnosticPropertiesBuilder description) {
|
void debugFillProperties(DiagnosticPropertiesBuilder description) {
|
||||||
super.debugFillProperties(description);
|
super.debugFillProperties(description);
|
||||||
const InputDecorationTheme defaultTheme = const InputDecorationTheme();
|
const InputDecorationTheme defaultTheme = const InputDecorationTheme();
|
||||||
description.add(new DiagnosticsProperty<TextStyle>('labelStyle', labelStyle,
|
description.add(new DiagnosticsProperty<TextStyle>('labelStyle', labelStyle, defaultValue: defaultTheme.labelStyle));
|
||||||
defaultValue: defaultTheme.labelStyle));
|
description.add(new DiagnosticsProperty<TextStyle>('helperStyle', helperStyle, defaultValue: defaultTheme.helperStyle));
|
||||||
description.add(new DiagnosticsProperty<TextStyle>('helperStyle', helperStyle,
|
description.add(new DiagnosticsProperty<TextStyle>('hintStyle', hintStyle, defaultValue: defaultTheme.hintStyle));
|
||||||
defaultValue: defaultTheme.helperStyle));
|
description.add(new DiagnosticsProperty<TextStyle>('errorStyle', errorStyle, defaultValue: defaultTheme.errorStyle));
|
||||||
description.add(new DiagnosticsProperty<TextStyle>('hintStyle', hintStyle,
|
description.add(new DiagnosticsProperty<bool>('isDense', isDense, defaultValue: defaultTheme.isDense));
|
||||||
defaultValue: defaultTheme.hintStyle));
|
description.add(new DiagnosticsProperty<EdgeInsets>('contentPadding', contentPadding, defaultValue: defaultTheme.contentPadding));
|
||||||
description.add(new DiagnosticsProperty<TextStyle>('errorStyle', errorStyle,
|
description.add(new DiagnosticsProperty<bool>('isCollapsed', isCollapsed, defaultValue: defaultTheme.isCollapsed));
|
||||||
defaultValue: defaultTheme.errorStyle));
|
description.add(new DiagnosticsProperty<TextStyle>('prefixStyle', prefixStyle, defaultValue: defaultTheme.prefixStyle));
|
||||||
description
|
description.add(new DiagnosticsProperty<TextStyle>('suffixStyle', suffixStyle, defaultValue: defaultTheme.suffixStyle));
|
||||||
.add(new DiagnosticsProperty<bool>('isDense', isDense, defaultValue: defaultTheme.isDense));
|
description.add(new DiagnosticsProperty<TextStyle>('counterStyle', counterStyle, defaultValue: defaultTheme.counterStyle));
|
||||||
description.add(new DiagnosticsProperty<EdgeInsets>('contentPadding', contentPadding,
|
description.add(new DiagnosticsProperty<bool>('filled', filled, defaultValue: defaultTheme.filled));
|
||||||
defaultValue: defaultTheme.contentPadding));
|
description.add(new DiagnosticsProperty<Color>('fillColor', fillColor, defaultValue: defaultTheme.fillColor));
|
||||||
description.add(new DiagnosticsProperty<bool>('isCollapsed', isCollapsed,
|
description.add(new DiagnosticsProperty<InputBorder>('border', border, defaultValue: defaultTheme.border));
|
||||||
defaultValue: defaultTheme.isCollapsed));
|
|
||||||
description.add(new DiagnosticsProperty<TextStyle>('prefixStyle', prefixStyle,
|
|
||||||
defaultValue: defaultTheme.prefixStyle));
|
|
||||||
description.add(new DiagnosticsProperty<TextStyle>('suffixStyle', suffixStyle,
|
|
||||||
defaultValue: defaultTheme.suffixStyle));
|
|
||||||
description.add(new DiagnosticsProperty<TextStyle>('counterStyle', counterStyle,
|
|
||||||
defaultValue: defaultTheme.counterStyle));
|
|
||||||
description
|
|
||||||
.add(new DiagnosticsProperty<bool>('filled', filled, defaultValue: defaultTheme.filled));
|
|
||||||
description.add(new DiagnosticsProperty<Color>('fillColor', fillColor,
|
|
||||||
defaultValue: defaultTheme.fillColor));
|
|
||||||
description.add(
|
|
||||||
new DiagnosticsProperty<InputBorder>('border', border, defaultValue: defaultTheme.border));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ class ThemeData extends Diagnosticable {
|
|||||||
backgroundColor ??= isDark ? Colors.grey[700] : primarySwatch[200];
|
backgroundColor ??= isDark ? Colors.grey[700] : primarySwatch[200];
|
||||||
dialogBackgroundColor ??= isDark ? Colors.grey[800] : Colors.white;
|
dialogBackgroundColor ??= isDark ? Colors.grey[800] : Colors.white;
|
||||||
indicatorColor ??= accentColor == primaryColor ? Colors.white : accentColor;
|
indicatorColor ??= accentColor == primaryColor ? Colors.white : accentColor;
|
||||||
hintColor ??= isDark ? const Color(0x42FFFFFF) : const Color(0x4C000000);
|
hintColor ??= isDark ? const Color(0x80FFFFFF) : const Color(0x8A000000);
|
||||||
errorColor ??= Colors.red[700];
|
errorColor ??= Colors.red[700];
|
||||||
inputDecorationTheme ??= const InputDecorationTheme();
|
inputDecorationTheme ??= const InputDecorationTheme();
|
||||||
iconTheme ??= isDark ? const IconThemeData(color: Colors.white) : const IconThemeData(color: Colors.black);
|
iconTheme ??= isDark ? const IconThemeData(color: Colors.white) : const IconThemeData(color: Colors.black);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user