Description
Hello Team,
I am encountering an issue with the scrollable_positioned_list package while implementing a list of widgets that includes AnimatedContainer for expandable items. The intended behavior is for the AnimatedContainer to uniformly expand in a specific direction when tapped. However, during testing, I observed that the expansion direction is not consistent: at times, it expands downwards, and at other times, it expands upwards.
This erratic behavior disrupts the user experience, as the expansion direction should be predictable and uniform for all list items.
Here is the detailed behavior:
When tapping on a collapsed AnimatedContainer, the expansion sometimes occurs towards the bottom and other times towards the top, regardless of its position in the list.
The expected behavior is for the AnimatedContainer to always expand in the same direction (either always downwards or always upwards) upon user interaction.
I have attached a video below demonstrating the issue:
IMG_7437.MOV
my code:
init Controller
void initState() {
super.initState();
itemScrollController = ItemScrollController();
}
return ScrollablePositionedList.builder(
initialScrollIndex: currentDataPosition,
itemScrollController: itemScrollController,
itemCount: displayList.length,
itemBuilder: (BuildContext context, int index) {
return ScenarioItem(
scenario: displayList[index].scenarios,
topic: displayList[index].topic,
currentScenarioPosition: currentDataPosition,
);
},
);