CollapsibleTrigger constructor

const CollapsibleTrigger({
  1. Key? key,
  2. required Widget child,
})

Creates a CollapsibleTrigger with the specified child content.

Parameters:

  • child (Widget, required): The content to display in the trigger.

The trigger automatically provides:

  • Expand/collapse icon based on current state
  • Click handling to toggle the parent collapsible
  • Proper spacing and layout with theme-aware styling
  • Integration with parent Collapsible state

Example:

CollapsibleTrigger(
  child: Text('Click to toggle content'),
);

Implementation

const CollapsibleTrigger({super.key, required this.child});