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'));