ExpansionWidget constructor
const
ExpansionWidget({
- Key? key,
- required Widget titleBuilder(),
- bool onExpansionWillChange()?,
- void onExpansionChanged()?,
- required Widget content,
- bool initiallyExpanded = false,
- bool maintainState = false,
- Alignment expandedAlignment = Alignment.center,
- void onSaveState(
- BuildContext context,
- bool isExpanded
- bool? onRestoreState()?,
- Duration duration = const Duration(milliseconds: 200),
Creates a widget with a customizable title that can expands or collapses the widget to reveal or hide the content.
Implementation
const ExpansionWidget({
Key? key,
required this.titleBuilder,
this.onExpansionWillChange,
this.onExpansionChanged,
required this.content,
this.initiallyExpanded = false,
this.maintainState = false,
this.expandedAlignment = Alignment.center,
this.onSaveState,
this.onRestoreState,
this.duration = const Duration(milliseconds: 200),
}) : super(key: key);