ExpansionWidget constructor

const ExpansionWidget({
  1. Key? key,
  2. required Widget titleBuilder(
    1. double animationValue,
    2. double easeInValue,
    3. bool isExpanded,
    4. dynamic toggleFunction({
      1. bool animated,
      }),
    ),
  3. bool onExpansionWillChange(
    1. bool
    )?,
  4. void onExpansionChanged(
    1. bool
    )?,
  5. required Widget content,
  6. bool initiallyExpanded = false,
  7. bool maintainState = false,
  8. Alignment expandedAlignment = Alignment.center,
  9. void onSaveState(
    1. BuildContext context,
    2. bool isExpanded
    )?,
  10. bool? onRestoreState(
    1. BuildContext
    )?,
  11. 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);