food_panda_sticky_header icon indicating copy to clipboard operation
food_panda_sticky_header copied to clipboard

Incorrect TabController Animate Position

Open sopharasum opened this issue 2 years ago • 5 comments

When there is a food item with more than 15 records, the tab controller does not animate to the correct position. It's always animated to the previous position. For example, if the list is showing category position #2, the tab controller will animate to position 1

sopharasum avatar Sep 08 '22 04:09 sopharasum

May I have demo or screenshot?

theachoem avatar Sep 08 '22 04:09 theachoem

https://user-images.githubusercontent.com/31350036/189034931-aa10ac06-2a4c-4783-b0b9-edf32100e53e.mp4

sopharasum avatar Sep 08 '22 04:09 sopharasum

@sopharasum is there any elements on section 1?

theachoem avatar Sep 08 '22 04:09 theachoem

@sopharasum is there any elements on section 1?

There is a popular item for the first section.

You can increase the length of any food list in any category to see the issue. I have increased the length of second category to 15

static Category category2 = Category(
    title: "ទិញ១ថែម១",
    subtitle: "រងចាំយ៉ាងតិច 30នាទី",
    isHotSale: false,
    foods: List.generate(
      15,
      (index) {
        return Food(
          name: "សូកូឡាដូងក្រអូប",
          price: "1.33",
          comparePrice: "\$1.90",
          imageUrl: images[index % images.length],
          isHotSale: index == 2 ? true : false,
        );
      },
    ),
  );

sopharasum avatar Sep 08 '22 04:09 sopharasum

@sopharasum I can't check it yet at the moment, I will have a look around next week.

If you find a solution, please make a PR, thank you!

theachoem avatar Sep 09 '22 04:09 theachoem