Skip to content

[material_ui] Add trailingIconVisibility to ExpansionPanel (#179167) - #12819

Open
benji-farquhar wants to merge 1 commit into
flutter:mainfrom
benji-farquhar:trailing-icon-visibility
Open

[material_ui] Add trailingIconVisibility to ExpansionPanel (#179167)#12819
benji-farquhar wants to merge 1 commit into
flutter:mainfrom
benji-farquhar:trailing-icon-visibility

Conversation

@benji-farquhar

Copy link
Copy Markdown
Contributor

Ports flutter/flutter#183951 to material_ui, following the instructions in flutter/flutter#188444.

Description

Introduces the ExpansionPanelIconVisibility enum (visible, hidden, gone) to ExpansionPanel.trailingIconVisibility.

This allows controlling whether the trailing expand/collapse icon is visible, hidden (preserving its layout space for alignment), or gone (removed from layout completely).

Fixes flutter/flutter#179167
Supersedes flutter/flutter#183951

cc @dkwingsmt @victorsanni who previously reviewed and approved the original PR in flutter/flutter#183951.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@google-cla

google-cla Bot commented Sep 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Sep 10, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the ExpansionPanelIconVisibility enum and a corresponding trailingIconVisibility property to ExpansionPanel and ExpansionPanelRadio to control the visibility of the trailing expand/collapse icon. It also includes an example application, unit tests, and integration tests. The review feedback correctly identifies multiple instances where enum values are referenced using invalid leading dot shorthand (e.g., .visible, .hidden, .gone) instead of their fully qualified names, which will cause compilation errors in Dart.

Comment thread packages/material_ui/lib/src/expansion_panel.dart
@benji-farquhar
benji-farquhar force-pushed the trailing-icon-visibility branch from 8aa887c to 18be17e Compare September 10, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow ExpansionPanel with null body

1 participant