ZetaAccordionItem constructor

const ZetaAccordionItem({
  1. required String title,
  2. Widget? child,
  3. bool isExpanded = false,
  4. bool isSelected = false,
  5. bool isSelectable = false,
  6. bool isNavigation = false,
  7. Widget? header,
  8. VoidCallback? onTap,
  9. Key? key,
  10. bool? rounded,
  11. String expandSemanticLabel = 'Expand accordion',
  12. String collapseSemanticLabel = 'Collapse accordion',
})

Constructs a ZetaAccordionItem.

Implementation

const ZetaAccordionItem({
  required this.title,
  this.child,
  this.isExpanded = false,
  this.isSelected = false,
  this.isSelectable = false,
  this.isNavigation = false,
  this.header,
  this.onTap,
  super.key,
  super.rounded,
  this.expandSemanticLabel = 'Expand accordion',
  this.collapseSemanticLabel = 'Collapse accordion',
})  : assert(
        !(isSelectable && isNavigation),
        'Selectable items cannot be navigation items. Please use either selectable or navigation.',
      ),
      assert((isNavigation && child == null) || !isNavigation, 'Navigation items must not have a child widget');