ExpansionWidget constructor
const
ExpansionWidget({
- Key? key,
- Widget? leading,
- required Widget title,
- Widget? subtitle,
- Color? backgroundColor,
- ValueChanged<
bool> ? onExpansionChanged, - List<
Widget> children = const <Widget>[], - Widget? trailing,
- EdgeInsets? padding,
- String? tooltip,
- bool initiallyExpanded = true,
- bool maintainState = false,
- EdgeInsetsGeometry? tilePadding,
- CrossAxisAlignment? expandedCrossAxisAlignment,
- Alignment? expandedAlignment,
- EdgeInsetsGeometry? childrenPadding,
- Color? collapsedBackgroundColor,
- bool showDivider = false,
- bool isDisable = false,
- bool showTitle = true,
Implementation
const ExpansionWidget({
Key? 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.',
),
super(key: key);