expandable_plus library
Expandable and collapsible panels for Flutter.
expandable_plus is a maintained, drop-in continuation of the expandable
package. It keeps the original public API, so existing code keeps working
after you change the import, and it adds a few things the original was
missing:
- Accordion groups, so sibling panels can be made mutually exclusive. See ExpandableGroupController.
- A configurable ExpandableThemeData.headerPadding.
- A fix for body taps not toggling a standalone ExpandablePanel.
Most apps need either ExpandablePanel for a ready-made panel, or the combination of ExpandableNotifier, Expandable and ExpandableButton for a custom layout.
Classes
- Expandable
- Shows either collapsed or expanded depending on the controller state, and animates between the two.
- ExpandableButton
- Toggles the enclosing ExpandableController when the user taps child.
- ExpandableController
- Controls whether one or more Expandable widgets are expanded or collapsed.
- ExpandableGroupController
- Coordinates a set of ExpandableControllers so that at most one is expanded at a time, like an accordion.
- ExpandableIcon
- An arrow icon that toggles the enclosing ExpandableController when tapped, rotating as the state changes.
- ExpandableNotifier
- Provides an ExpandableController to a widget subtree.
- ExpandablePanel
- A configurable expandable widget with an optional header and expand icon.
- ExpandableTheme
- Provides an ExpandableThemeData to a widget subtree.
- ExpandableThemeData
- Visual and behavioural configuration for the expandable widgets.
- ScrollOnExpand
- Scrolls its child into view when the enclosing ExpandableController changes state, so an expanded panel becomes visible in a scroll view.
Enums
- ExpandablePanelBodyAlignment
- Determines the horizontal alignment of the body in ExpandablePanel.
- ExpandablePanelHeaderAlignment
- Determines how the header is aligned relative to the expand/collapse icon in ExpandablePanel.
- ExpandablePanelIconPlacement
- Determines the placement of the expand/collapse icon in ExpandablePanel.
Typedefs
- ExpandableBuilder = Widget Function(BuildContext context, Widget collapsed, Widget expanded)
- Builds the widget shown by ExpandablePanel from its collapsed and expanded children.