ExpansionPanel constructor Null safety
- {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.
The headerBuilder, body, and isExpanded
arguments must not be null.
Implementation
ExpansionPanel({
required this.headerBuilder,
required this.body,
this.isExpanded = false,
this.canTapOnHeader = false,
this.backgroundColor,
}) : assert(headerBuilder != null),
assert(body != null),
assert(isExpanded != null),
assert(canTapOnHeader != null);