ExpansionWidget constructor

const ExpansionWidget({
  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 <Widget>[],
  8. Widget? trailing,
  9. EdgeInsets? padding,
  10. String? tooltip,
  11. bool initiallyExpanded = true,
  12. bool maintainState = false,
  13. EdgeInsetsGeometry? tilePadding,
  14. CrossAxisAlignment? expandedCrossAxisAlignment,
  15. Alignment? expandedAlignment,
  16. EdgeInsetsGeometry? childrenPadding,
  17. Color? collapsedBackgroundColor,
  18. bool showDivider = false,
  19. bool isDisable = false,
  20. bool showTitle = true,
})

Implementation

const ExpansionWidget({
  super.key,
  this.leading,
  required this.title,
  this.subtitle,
  this.backgroundColor,
  this.onExpansionChanged,
  this.children = const <Widget>[],
  this.trailing,
  this.padding,
  this.tooltip,
  this.initiallyExpanded = true,
  this.maintainState = false,
  this.tilePadding,
  this.expandedCrossAxisAlignment,
  this.expandedAlignment,
  this.childrenPadding,
  this.collapsedBackgroundColor,
  this.showDivider = false,
  this.isDisable = false,
  this.showTitle = true,
}) : 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.',
      );