ExpansionPanel class Null safety

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})
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.
read-onlyinherited
headerBuilder ExpansionPanelHeaderBuilder
The widget builder that builds the expansion panels' header.
final
isExpanded bool
Whether the panel is expanded.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

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

Operators

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