Expandable
The Expandable widget is a versatile container that allows you to show or hide content dynamically. It consists of a header that is always visible and a body that can be expanded or collapsed with a tap. This is useful for creating accordions, collapsible sections, or any UI element where you need to toggle the visibility of content to save space.
Properties
Active View
The current state of the expandable (Collapsed
or Expanded
).
Initially Expanded
If true
, the widget will be expanded by default when it first loads.
Alignment
The alignment of the entire expandable widget.
Body Alignment
The alignment of the content within the body of the expandable widget.
Header Alignment
The alignment of the content within the header of the expandable widget.
Use InkWell Effect
If true
, a ripple effect will be shown on tap.
InkWell Border Radius
The corner radius for the ripple effect when InkWell is enabled.
Animation Duration
The duration of the expand and collapse animation in milliseconds.
Tap Behavior Properties
Tab Header To Expand
If true
, tapping the header will expand the widget.
Tab Body To Expand
If true
, tapping the body will expand the widget.
Tab Body To Collapse
If true
, tapping the body will collapse the widget.
Icon Properties
Has Icon
If true
, an icon will be displayed in the header.
Icon Placement
The placement of the icon in the header (Left
or Right
).
Icon Padding
The padding around the icon.
Collapse Icon
The icon to display when the widget is collapsed.
Expand Icon
The icon to display when the widget is expanded.
Icon Size
The size of the icon in pixels.
Icon Color
The color of the icon.
Icon Rotation Angle
The angle to rotate the icon when the widget is expanded.
Default Properties
The Expandable widget supports all Default Properties.
Children of Expandable
header
The widget to use as the header, which is always visible.
collapsedView
The widget to display when the expandable is collapsed.
expandedView
The widget to display when the expandable is expanded.
Last updated