Use ColorScheme.primary (not secondary), ExpansionTile expanded color (#81241)

This commit is contained in:
Hans Muller 2021-04-27 08:30:08 -07:00 committed by GitHub
parent 3eb5736134
commit 3533321b1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -293,10 +293,10 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
_borderColorTween.end = theme.dividerColor; _borderColorTween.end = theme.dividerColor;
_headerColorTween _headerColorTween
..begin = widget.collapsedTextColor ?? theme.textTheme.subtitle1!.color ..begin = widget.collapsedTextColor ?? theme.textTheme.subtitle1!.color
..end = widget.textColor ?? colorScheme.secondary; ..end = widget.textColor ?? colorScheme.primary;
_iconColorTween _iconColorTween
..begin = widget.collapsedIconColor ?? theme.unselectedWidgetColor ..begin = widget.collapsedIconColor ?? theme.unselectedWidgetColor
..end = widget.iconColor ?? colorScheme.secondary; ..end = widget.iconColor ?? colorScheme.primary;
_backgroundColorTween _backgroundColorTween
..begin = widget.collapsedBackgroundColor ..begin = widget.collapsedBackgroundColor
..end = widget.backgroundColor; ..end = widget.backgroundColor;

View File

@ -154,7 +154,7 @@ void main() {
expect(collapsedContainerDecoration.border!.bottom.color, _dividerColor); expect(collapsedContainerDecoration.border!.bottom.color, _dividerColor);
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS })); }, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
testWidgets('ListTileTheme', (WidgetTester tester) async { testWidgets('ExpansionTile Theme dependencies', (WidgetTester tester) async {
final Key expandedTitleKey = UniqueKey(); final Key expandedTitleKey = UniqueKey();
final Key collapsedTitleKey = UniqueKey(); final Key collapsedTitleKey = UniqueKey();
final Key expandedIconKey = UniqueKey(); final Key expandedIconKey = UniqueKey();
@ -163,7 +163,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
theme: ThemeData( theme: ThemeData(
colorScheme: ColorScheme.fromSwatch().copyWith(secondary: _foregroundColor), colorScheme: ColorScheme.fromSwatch().copyWith(primary: _foregroundColor),
unselectedWidgetColor: _unselectedWidgetColor, unselectedWidgetColor: _unselectedWidgetColor,
textTheme: const TextTheme(subtitle1: TextStyle(color: _headerColor)), textTheme: const TextTheme(subtitle1: TextStyle(color: _headerColor)),
), ),