FAccordionControl.lifted constructor

const FAccordionControl.lifted({
  1. required Predicate<int> expanded,
  2. required void onChange(
    1. int index,
    2. bool expanded
    ),
})

Creates a FAccordionControl for controlling an accordion using lifted state.

The expanded function should return true if the item at the given index is expanded. It must be idempotent. The onChange callback is invoked when the user toggles an item.

Implementation

const factory FAccordionControl.lifted({
  required Predicate<int> expanded,
  required void Function(int index, bool expanded) onChange,
}) = _Lifted;