ExpansionTile constructor

const ExpansionTile(
  1. {Key key,
  2. Widget leading,
  3. @required Widget title,
  4. Widget subtitle,
  5. Color backgroundColor,
  6. ValueChanged<bool> onExpansionChanged,
  7. List<Widget> children: const [],
  8. Widget trailing,
  9. bool initiallyExpanded: false,
  10. bool maintainState: false,
  11. EdgeInsetsGeometry tilePadding,
  12. CrossAxisAlignment expandedCrossAxisAlignment,
  13. Alignment expandedAlignment,
  14. EdgeInsetsGeometry 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 ExpansionTile({
  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);