tp7309 / flutter_sticky_and_expandable_list

粘性头部与分组列表Sliver实现 Build a grouped list, which support expand/collapse section and sticky headers, support use it with sliver widget.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Animation issue, header jumps to top after animation

mkoorn opened this issue · comments

Hi, thank you for your work on this package.

I noticed an animation issue on larger lists.

  1. set /MockData/.getExampleSections(3, 12);
  2. Open CustomSectionAnimation Example
  3. scroll to bottom
  4. collapse header #2
  5. Note that during the animation header #1 sticks to header #2 until section #2 collapse is finished, after that header #1 jumps to top.

2020-10-06 13 59 32

In ListView, this is a normal behavior.
Because when scroll to bottom and collapse Header #2, it means collapse Section 2(index in ListView),Section=Header+Content, so when collpase it, section's height equals to header's height, and Section 2 is last item in ListView, so the bottom of Section 2 must align with the bottom of ListView, this is a limitation of ListView.

The issue for me is not that the header of section 2 scroll to the bottom. The issue is that the header of section 1 is sticking to header 2 while animating and then only after animation jumps to the top.

Expected behavior for me would be that the header of section 1 animates and stays at its final position during the animation of for section 2. In this case, header 1 stays at the top.

It seems that I need upgrade MacOS to use latest iOS emulator.

It seems that I need upgrade MacOS to use latest iOS emulator.

I also tested on Android device and emulator. same issue.

No same issue, try git pull and try again?

dependencies:
  sticky_and_expandable_list: ^0.2.3

Oct-09-2020 08-54-46

I am very confused. I'm using the example from this repo to reproduce the issue on my mac.

[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-NL)
• Flutter version 1.22.0 at /Users/.../development/flutter
• Framework revision d408d302e2 (10 days ago), 2020-09-29 11:49:17 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at /Users/.../Library/Android/sdk
• Platform android-30, build-tools 29.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 48.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.15.0

[✓] Connected device (2 available)
• iPhoneX (mobile) • 9875581fb1ac7f5581b89d87e9a0fcc8897b1a9e • ios • iOS 14.2
• iPhone 11 (mobile) • BE7C3300-E4CD-43F7-A3E0-106548B091A9 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
! Error: iPad Pro is not connected. Xcode will continue when iPad Pro is connected. (code -13)

• No issues found!

Flutter 1.22 compat issue, checking...

no good solution currently, a temp solution:
hide header #1 before collapse header #2.

ok, thanks for checking it out.