FAccordionController constructor
Creates a FAccordionController.
The min
and max
values define the minimum and maximum number of expanded sections allowed.
Defaults to no minimum and maximum.
Contract:
- Throws AssertionError if
min
< 0. - Throws AssertionError if
max
<min
.
Implementation
FAccordionController({
int min = 0,
int? max,
}) : _min = min,
_max = max,
controllers = {},
_expanded = {},
assert(min >= 0, 'The min value must be greater than or equal to 0.'),
assert(max == null || 0 <= max, 'The max value must be greater than or equal to 0.'),
assert(max == null || min <= max, 'The max value must be greater than or equal to the min value.');