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)), ),