Unverified Commit fbc3683b authored by Daniel's avatar Daniel Committed by GitHub

ChoiceChip's default "selected" style in dark mode theme is unreadable #49984 (#74610)

parent 6d9e3c3f
......@@ -416,7 +416,7 @@ class ThemeData with Diagnosticable {
bottomAppBarTheme ??= const BottomAppBarTheme();
cardTheme ??= const CardTheme();
chipTheme ??= ChipThemeData.fromDefaults(
secondaryColor: primaryColor,
secondaryColor: isDark ? Colors.tealAccent[200]! : primaryColor,
brightness: colorScheme.brightness,
labelStyle: textTheme.bodyText1!,
);
......
......@@ -61,9 +61,23 @@ void main() {
expect(chipTheme.backgroundColor, equals(Colors.black.withAlpha(0x1f)));
expect(chipTheme.selectedColor, equals(Colors.black.withAlpha(0x3d)));
expect(chipTheme.secondarySelectedColor, equals(Colors.red.withAlpha(0x3d)));
expect(chipTheme.deleteIconColor, equals(Colors.black.withAlpha(0xde)));
});
testWidgets('Chip theme is built by ThemeData with dark mode enabled', (WidgetTester tester) async {
final ThemeData theme = ThemeData(
platform: TargetPlatform.android,
brightness: Brightness.dark,
);
final ChipThemeData chipTheme = theme.chipTheme;
expect(chipTheme.backgroundColor, equals(Colors.white.withAlpha(0x1f)));
expect(chipTheme.selectedColor, equals(Colors.white.withAlpha(0x3d)));
expect(chipTheme.secondarySelectedColor, equals(Colors.tealAccent[200]!.withAlpha(0x3d)));
expect(chipTheme.deleteIconColor, equals(Colors.white.withAlpha(0xde)));
});
testWidgets('Chip uses ThemeData chip theme if present', (WidgetTester tester) async {
final ThemeData theme = ThemeData(
platform: TargetPlatform.android,
......
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