ExpansionPanelList.radio constructor
- Key? key,
- List<
ExpansionPanel> children = const <ExpansionPanelRadio>[], - ExpansionPanelCallback? expansionCallback,
- Duration animationDuration = kThemeAnimationDuration,
- Object? initialOpenPanelValue,
- EdgeInsets expandedHeaderPadding = _kPanelHeaderExpandedDefaultPadding,
- Color? dividerColor,
- double elevation = 2,
- Color? expandIconColor,
- double materialGapSize = 16.0,
Creates a radio expansion panel list widget.
This widget allows for at most one panel in the list to be open. The
expansion panel callback is triggered when an expansion panel
expand/collapse button is pushed. The children
objects must be instances
of ExpansionPanelRadio.
Here is a simple example of how to implement ExpansionPanelList.radio.
link
To create a local project with this code sample, run:
flutter create --sample=material.ExpansionPanelList.ExpansionPanelList.radio.1 mysample
Implementation
const ExpansionPanelList.radio({
super.key,
this.children = const <ExpansionPanelRadio>[],
this.expansionCallback,
this.animationDuration = kThemeAnimationDuration,
this.initialOpenPanelValue,
this.expandedHeaderPadding = _kPanelHeaderExpandedDefaultPadding,
this.dividerColor,
this.elevation = 2,
this.expandIconColor,
this.materialGapSize = 16.0,
}) : _allowOnlyOnePanelOpen = true;