From 3533321b1a10cc415c4e9c4fecc0371864dfb4e4 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Tue, 27 Apr 2021 08:30:08 -0700 Subject: [PATCH] Use ColorScheme.primary (not secondary), ExpansionTile expanded color (#81241) --- packages/flutter/lib/src/material/expansion_tile.dart | 4 ++-- packages/flutter/test/material/expansion_tile_test.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/flutter/lib/src/material/expansion_tile.dart b/packages/flutter/lib/src/material/expansion_tile.dart index 2e90e9d269..2b56d80b27 100644 --- a/packages/flutter/lib/src/material/expansion_tile.dart +++ b/packages/flutter/lib/src/material/expansion_tile.dart @@ -293,10 +293,10 @@ class _ExpansionTileState extends State with SingleTickerProvider _borderColorTween.end = theme.dividerColor; _headerColorTween ..begin = widget.collapsedTextColor ?? theme.textTheme.subtitle1!.color - ..end = widget.textColor ?? colorScheme.secondary; + ..end = widget.textColor ?? colorScheme.primary; _iconColorTween ..begin = widget.collapsedIconColor ?? theme.unselectedWidgetColor - ..end = widget.iconColor ?? colorScheme.secondary; + ..end = widget.iconColor ?? colorScheme.primary; _backgroundColorTween ..begin = widget.collapsedBackgroundColor ..end = widget.backgroundColor; diff --git a/packages/flutter/test/material/expansion_tile_test.dart b/packages/flutter/test/material/expansion_tile_test.dart index a80f929e74..26e3892936 100644 --- a/packages/flutter/test/material/expansion_tile_test.dart +++ b/packages/flutter/test/material/expansion_tile_test.dart @@ -154,7 +154,7 @@ void main() { expect(collapsedContainerDecoration.border!.bottom.color, _dividerColor); }, variant: const TargetPlatformVariant({ TargetPlatform.iOS, TargetPlatform.macOS })); - testWidgets('ListTileTheme', (WidgetTester tester) async { + testWidgets('ExpansionTile Theme dependencies', (WidgetTester tester) async { final Key expandedTitleKey = UniqueKey(); final Key collapsedTitleKey = UniqueKey(); final Key expandedIconKey = UniqueKey(); @@ -163,7 +163,7 @@ void main() { await tester.pumpWidget( MaterialApp( theme: ThemeData( - colorScheme: ColorScheme.fromSwatch().copyWith(secondary: _foregroundColor), + colorScheme: ColorScheme.fromSwatch().copyWith(primary: _foregroundColor), unselectedWidgetColor: _unselectedWidgetColor, textTheme: const TextTheme(subtitle1: TextStyle(color: _headerColor)), ),