CustomExpansionTile constructor

const CustomExpansionTile(
  1. {dynamic key,
  2. dynamic leading,
  3. @required dynamic title,
  4. dynamic subtitle,
  5. dynamic backgroundColor,
  6. dynamic onExpansionChanged,
  7. List children: const <Widget>[],
  8. dynamic trailing,
  9. bool initiallyExpanded: false,
  10. bool maintainState: false,
  11. dynamic tilePadding,
  12. dynamic expandedCrossAxisAlignment,
  13. dynamic expandedAlignment,
  14. dynamic childrenPadding}
)

Creates a single-line ListTile with a trailing button that expands or collapses the tile to reveal or hide the children. The initiallyExpanded property must be non-null.

Implementation

const CustomExpansionTile({
  Key key,
  this.leading,
  @required this.title,
  this.subtitle,
  this.backgroundColor,
  this.onExpansionChanged,
  this.children = const <Widget>[],
  this.trailing,
  this.initiallyExpanded = false,
  this.maintainState = false,
  this.tilePadding,
  this.expandedCrossAxisAlignment,
  this.expandedAlignment,
  this.childrenPadding,
})  : assert(initiallyExpanded != null),
      assert(maintainState != null),
      assert(
        expandedCrossAxisAlignment != CrossAxisAlignment.baseline,
        'CrossAxisAlignment.baseline is not supported since the expanded children '
        'are aligned in a column, not a row. Try to use another constant.',
      ),
      super(key: key);