ExpandableSliverList<T> constructor
ExpandableSliverList<T> ({
- Key? key,
- required Iterable<
T> initialItems, - required ExpandableItemBuilder<
T> builder, - required ExpandableSliverListController<
T> controller, - @Deprecated("Use 'initialState' argument in the constructor of ExpandableSliverListController instead. This argument will be removed on Jan 3, 2022. If using the non-deprecated form, make sure to remove this argument as well, as this will overwrite the value set in the controller") bool? startCollapsed,
- Duration duration = kDefaultDuration,
- bool expandOnInitialInsertion = false,
items, build, and controller must be provided
Implementation
ExpandableSliverList({
Key? key,
required Iterable<T> initialItems,
required this.builder,
required this.controller,
@Deprecated("Use 'initialState' argument in the constructor of ExpandableSliverListController instead. This argument will be removed on Jan 3, 2022. If using the non-deprecated form, make sure to remove this argument as well, as this will overwrite the value set in the controller")
bool? startCollapsed,
this.duration = kDefaultDuration,
this.expandOnInitialInsertion = false,
}) : initialItems = List<T>.from(initialItems),
super(key: key) {
if (startCollapsed != null) {
this.startCollapsed = startCollapsed;
usedDeprecatedArg = true;
} else {
this.startCollapsed = false;
usedDeprecatedArg = false;
}
}