Closed jcblancomartinez closed 3 years ago
@jerrywell When SmartRefresher is defined as parent of SingleChildScrollView, _RenderSingleChildViewport's _maxScrollExtent is 0.0. My understanding is that both SmartRefresher and SingleChildScrollView have the same height.
Could you please help me debug this issue?
Thanks.
try to use ListView with SingleChildScrollView ?
@jerrywell could you please modify the code example where SmartRefresher is defined as parent of SingleChildScrollView with your proposal and paste it here?
Anyways, in the code example where SmartRefresher is not defined as parent of SingleChildScrollView, I'm not using ListView but SingleChildScrollView and it works fine.
Is there any fix that requires no ListView?
Thanks. Thank you.
unfortunately SmartRefresher
is not official package. we are using the official RefreshIndicator
without any issue, you can also check it. pull request is welcome. thanks : )
Replacing SingleChildScrollView with ListView worked as suggested.
Thanks.
Describe the bug
scrollToIndex is not working when defining SmartRefresher as parent of SingleChildScrollView. scrollToIndexis working as expected wihout SmartRefresher as parent of SingleChildScrollView.
Reproduction code
Code working as expected when no SmartRefresher is defined as parent of SingleChildScrollView:
Code not working as expected when SmartRefresher is defined as parent of SingleChildScrollView:
To Reproduce Steps to reproduce the behavior:
Expected behavior
scrollToIndex should take us to the second container.
Flutter Version:
juancarlos@juancarlos-XPS-15-7590:~/AndroidStudioProjects/solon_flutter_app$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.2.0, on Linux, locale en_US.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] Connected device (2 available)
• No issues found!
Dependencies:
pull_to_refresh: ^2.0.0 scroll_to_index: ^2.0.0
Describe on which device you found the bug: Android 11 emulator