ExpansionPanel class

A material expansion panel. It has a header and a body and can be either expanded or collapsed. The body of the panel is only visible when it is expanded.

Expansion panels are only intended to be used as children for ExpansionPanelList.

See ExpansionPanelList for a sample implementation.

See also:

Implementers

Constructors

ExpansionPanel({required ExpansionPanelHeaderBuilder headerBuilder, required Widget body, bool isExpanded = false, bool canTapOnHeader = false, Color? backgroundColor, Color? splashColor, Color? highlightColor})
Creates an expansion panel to be used as a child for ExpansionPanelList. See ExpansionPanelList for an example on how to use this widget.

Properties

backgroundColor Color?
Defines the background color of the panel.
final
body Widget
The body of the expansion panel that's displayed below the header.
final
canTapOnHeader bool
Whether tapping on the panel's header will expand/collapse it.
final
hashCode int
The hash code for this object.
no setterinherited
headerBuilder ExpansionPanelHeaderBuilder
The widget builder that builds the expansion panels' header.
final
highlightColor Color?
Defines the highlight color of the panel if canTapOnHeader is true, or the highlight color of the expand/collapse IconButton if canTapOnHeader is false.
final
isExpanded bool
Whether the panel is expanded.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splashColor Color?
Defines the splash color of the panel if canTapOnHeader is true, or the splash color of the expand/collapse IconButton if canTapOnHeader is false.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited