ExpansionPanelList.radio constructor

const ExpansionPanelList.radio({
  1. Key? key,
  2. List<ExpansionPanel> children = const <ExpansionPanelRadio>[],
  3. ExpansionPanelCallback? expansionCallback,
  4. Duration animationDuration = kThemeAnimationDuration,
  5. Object? initialOpenPanelValue,
  6. EdgeInsets expandedHeaderPadding = _kPanelHeaderExpandedDefaultPadding,
  7. Color? dividerColor,
  8. double elevation = 2,
  9. Color? expandIconColor,
  10. 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;