ExpansionPanelList.radio constructor Null safety

const ExpansionPanelList.radio(
  1. {Key? key,
  2. List<ExpansionPanel> children,
  3. ExpansionPanelCallback? expansionCallback,
  4. Duration animationDuration,
  5. Object? initialOpenPanelValue,
  6. EdgeInsets expandedHeaderPadding,
  7. Color? dividerColor,
  8. double elevation}
)

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 and animationDuration arguments must not be null. The children objects must be instances of ExpansionPanelRadio.

Here is a simple example of how to implement ExpansionPanelList.radio.
To create a local project with this code sample, run:
flutter create --sample=material.ExpansionPanelList.radio.1 mysample

Implementation

const ExpansionPanelList.radio({
  Key? key,
  this.children = const <ExpansionPanelRadio>[],
  this.expansionCallback,
  this.animationDuration = kThemeAnimationDuration,
  this.initialOpenPanelValue,
  this.expandedHeaderPadding = _kPanelHeaderExpandedDefaultPadding,
  this.dividerColor,
  this.elevation = 2,
}) : assert(children != null),
     assert(animationDuration != null),
     _allowOnlyOnePanelOpen = true,
     super(key: key);