Description
Package
https://pub.dev/packages/scrollable_positioned_list
scrollable_positioned_list 0.1.9 & others
The scrollTo a particular index fails to go to the correct position when the List Items are of different heights (random). This does not happen when the items have the same height.
Please check the attached code to reproduce.
scrollable_list_audioservice.zip
Expected behavior
ScrollTo should position the ListView with the selected Item "top" edge visible.
Actual behavior
The stated before does not happens most of the times Scrollto is called. And sometimes even nothing from the selected item is showed on the screen
Environment
Flutter Latest 1.22.5, both Android and iOS
C:\Users\martinwo\Documents\GIT\scrollable_list_audioservice>flutter doctor -v
[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.17763.1637], locale es-UY)
• Flutter version 1.22.5 at C:\Users\martinwo\flutter
• Framework revision 7891006299 (6 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\martinwo\AppData\Local\Android\sdk
• Platform android-30, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 50.0.1
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
Additional details
This same code works as expected in Flutter 1.20.0
No errors are shown at the logs