ExpansionPanelList constructor Null safety

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

Creates an expansion panel list widget. The expansionCallback is triggered when an expansion panel expand/collapse button is pushed.

The children and animationDuration arguments must not be null.

Implementation

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