BarSection constructor

const BarSection({
  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 expandable = false,
  12. bool initiallyExpanded = true,
  13. List<Widget> trailing = const [],
})

Creates a non-expandable BarSection with optional title, subtitle, and header elements.

The sliver is the required content body. backButton controls navigation (default never). expandable defaults to false for static sections. Leading and trailing allow custom widgets.

Implementation

const BarSection(
    {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.expandable = false,
    this.initiallyExpanded = true,
    this.trailing = const []});