feat: scrollable ExpansionPanelList#6294
Merged
FeodorFitsner merged 6 commits intomainfrom Mar 17, 2026
Merged
Conversation
Deploying flet-examples with
|
| Latest commit: |
fe32290
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f41b7c1c.flet-examples.pages.dev |
| Branch Preview URL: | https://expansionpanellist-scroll.flet-examples.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds first-class scrolling support to the Material ExpansionPanelList control (Python + Flutter runtime) and upgrades its on_change event to a typed payload so handlers can reliably access both the toggled panel index and its expanded/collapsed state.
Changes:
- Make
ExpansionPanelListscrollable by mixing inScrollableControl(Python) and wrapping the Flutter widget withScrollableControl/ScrollNotificationControl. - Introduce
ExpansionPanelListChangeEventand wireon_changeto deliver{index, expanded}(while keepingdata=indexfor backward compatibility). - Update docs and examples to describe and demonstrate scrollable
ExpansionPanelList, and add the new event type page to the docs nav.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/python/packages/flet/src/flet/controls/material/expansion_panel.py | Adds ExpansionPanelListChangeEvent, switches ExpansionPanelList to ScrollableControl, updates on_change typing/docstrings. |
| sdk/python/packages/flet/src/flet/init.py | Exposes ExpansionPanelListChangeEvent at the top-level flet package. |
| sdk/python/packages/flet/mkdocs.yml | Registers the new event type doc page in navigation. |
| sdk/python/packages/flet/docs/types/expansionpanellistchangeevent.md | Adds generated docs page for the new event payload type. |
| sdk/python/packages/flet/docs/controls/expansionpanellist.md | Documents scrolling support and links a new scrollable example. |
| sdk/python/examples/controls/expansion_panel_list/scrollable.py | Adds runnable example demonstrating scroll=ScrollMode.ALWAYS. |
| packages/flet/lib/src/controls/expansion_panel.dart | Wraps ExpansionPanelList in ScrollableControl and updates the change event payload to a dict including index and expanded. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdk/python/packages/flet/src/flet/controls/material/expansion_panel.py
Outdated
Show resolved
Hide resolved
Deploying flet-docs with
|
| Latest commit: |
fe32290
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://63a4344f.flet-docs.pages.dev |
| Branch Preview URL: | https://expansionpanellist-scroll.flet-docs.pages.dev |
FeodorFitsner
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test code
Summary by Sourcery
Add scrolling support and richer change events to ExpansionPanelList, and update associated docs and examples.
New Features:
Enhancements:
Documentation: