ExpansionPanelListChangeEvent
Payload for flet.ExpansionPanelList.on_change event.
Inherits: Event
Properties
expanded- Whether the toggled panel is expanded (True) or collapsed (False) after the event.index- The index of the panel in flet.ExpansionPanelList.controls that was toggled.
Properties
expandedinstance-attribute
expanded: boolWhether the toggled panel is expanded (True) or
collapsed (False) after the event.
indexinstance-attribute
index: intThe index of the panel in flet.ExpansionPanelList.controls that was toggled.
Panels with visible set to False are not counted/indexed.
This means the value may differ from the panel's position in the original
flet.ExpansionPanelList.controls list when some panels are invisible.
To map it back, filter flet.ExpansionPanelList.controls to only visible
panels and use this index on that filtered list.