From af2e28230f1639e071ad0138a8507691d85c37bf Mon Sep 17 00:00:00 2001 From: Darshan Rander Date: Tue, 11 Jul 2023 14:17:11 +0530 Subject: [PATCH] fix: `ExpansionTileTheme.shape` assignment in `ExpansionTile` (#127749) The ExpansionTile was not following `shape` from ExpansionTileTheme as it was assigning wrong parameter to the tween. fixes #129785 --- packages/flutter/lib/src/material/expansion_tile.dart | 2 +- packages/flutter/test/material/expansion_tile_theme_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/material/expansion_tile.dart b/packages/flutter/lib/src/material/expansion_tile.dart index 10ca52d5aa..3dc8e99f86 100644 --- a/packages/flutter/lib/src/material/expansion_tile.dart +++ b/packages/flutter/lib/src/material/expansion_tile.dart @@ -683,7 +683,7 @@ class _ExpansionTileState extends State with SingleTickerProvider bottom: BorderSide(color: Colors.transparent), ) ..end = widget.shape - ?? expansionTileTheme.collapsedShape + ?? expansionTileTheme.shape ?? Border( top: BorderSide(color: theme.dividerColor), bottom: BorderSide(color: theme.dividerColor), diff --git a/packages/flutter/test/material/expansion_tile_theme_test.dart b/packages/flutter/test/material/expansion_tile_theme_test.dart index 323d3eb254..cb29a397e5 100644 --- a/packages/flutter/test/material/expansion_tile_theme_test.dart +++ b/packages/flutter/test/material/expansion_tile_theme_test.dart @@ -290,7 +290,7 @@ void main() { // Check the expanded text color when textColor is applied. expect(getTextColor(), textColor); // Check the expanded ShapeBorder when shape is applied. - expect(shapeDecoration.shape, collapsedShape); + expect(shapeDecoration.shape, shape); // Check the child position when expandedAlignment is applied. final Rect childRect = tester.getRect(find.text('Tile 1'));