Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
fbc3683b
Unverified
Commit
fbc3683b
authored
Jan 26, 2021
by
Daniel
Committed by
GitHub
Jan 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChoiceChip's default "selected" style in dark mode theme is unreadable #49984 (#74610)
parent
6d9e3c3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+1
-1
chip_theme_test.dart
packages/flutter/test/material/chip_theme_test.dart
+14
-0
No files found.
packages/flutter/lib/src/material/theme_data.dart
View file @
fbc3683b
...
@@ -416,7 +416,7 @@ class ThemeData with Diagnosticable {
...
@@ -416,7 +416,7 @@ class ThemeData with Diagnosticable {
bottomAppBarTheme
??=
const
BottomAppBarTheme
();
bottomAppBarTheme
??=
const
BottomAppBarTheme
();
cardTheme
??=
const
CardTheme
();
cardTheme
??=
const
CardTheme
();
chipTheme
??=
ChipThemeData
.
fromDefaults
(
chipTheme
??=
ChipThemeData
.
fromDefaults
(
secondaryColor:
primaryColor
,
secondaryColor:
isDark
?
Colors
.
tealAccent
[
200
]!
:
primaryColor
,
brightness:
colorScheme
.
brightness
,
brightness:
colorScheme
.
brightness
,
labelStyle:
textTheme
.
bodyText1
!,
labelStyle:
textTheme
.
bodyText1
!,
);
);
...
...
packages/flutter/test/material/chip_theme_test.dart
View file @
fbc3683b
...
@@ -61,9 +61,23 @@ void main() {
...
@@ -61,9 +61,23 @@ void main() {
expect
(
chipTheme
.
backgroundColor
,
equals
(
Colors
.
black
.
withAlpha
(
0x1f
)));
expect
(
chipTheme
.
backgroundColor
,
equals
(
Colors
.
black
.
withAlpha
(
0x1f
)));
expect
(
chipTheme
.
selectedColor
,
equals
(
Colors
.
black
.
withAlpha
(
0x3d
)));
expect
(
chipTheme
.
selectedColor
,
equals
(
Colors
.
black
.
withAlpha
(
0x3d
)));
expect
(
chipTheme
.
secondarySelectedColor
,
equals
(
Colors
.
red
.
withAlpha
(
0x3d
)));
expect
(
chipTheme
.
deleteIconColor
,
equals
(
Colors
.
black
.
withAlpha
(
0xde
)));
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
{
testWidgets
(
'Chip uses ThemeData chip theme if present'
,
(
WidgetTester
tester
)
async
{
final
ThemeData
theme
=
ThemeData
(
final
ThemeData
theme
=
ThemeData
(
platform:
TargetPlatform
.
android
,
platform:
TargetPlatform
.
android
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment