BarSection.expandable constructor

const BarSection.expandable({
  1. Key? key,
  2. BarBackButtonMode backButton = BarBackButtonMode.never,
  3. Widget? title,
  4. required Widget sliver,
  5. Widget? subtitle,
  6. Widget? header,
  7. String? titleText,
  8. String? subtitleText,
  9. String? headerText,
  10. List<Widget> leading = const [],
  11. bool initiallyExpanded = true,
  12. List<Widget> trailing = const [],
})

Creates an expandable BarSection that delegates to ExpansionBarSection.

This named constructor sets expandable to true and initializes with the provided parameters, enabling collapsible behavior with initiallyExpanded state (default true) for dynamic content visibility in interactive UIs.

Implementation

const BarSection.expandable(
    {super.key,
    this.backButton = BarBackButtonMode.never,
    this.title,
    required this.sliver,
    this.subtitle,
    this.header,
    this.titleText,
    this.subtitleText,
    this.headerText,
    this.leading = const [],
    this.initiallyExpanded = true,
    this.trailing = const []})
    : expandable = true;