-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erro => scrollDirection: Axis.horizontal #13
Comments
@MarceloRab could you provide code sample? |
class MyEvestsListDayScroll extends StatefulWidget { @OverRide class MyEvestsListDayScrollState extends State { //DateTime dayEvents; @OverRide
} @OverRide
} |
Thanks in advance for the support. I commented on the part where the error occurs. => scrollDirection: Axis.horizontal. Could you share an example where - scrollDirection: Axis.horizontal is used? I am Brazilian. |
@MarceloRab sure - https://github.com/TatsuUkraine/flutter_sticky_infinite_list_example this is an example app, you can switch horizontal and vertical list there in left sidenav |
Thank you. I'm going to study and ask for help if you need it. Congratulations for the good work. |
@MarceloRab btw, I noticed that you going to render just 1 element with a bunch of data inside, so you can try to use just SingleChildScrollView with this widget inside https://github.com/TatsuUkraine/flutter_sticky_infinite_list/blob/master/lib/widget.dart#L363 |
That's right, I'm in testing mode. Already tested with many elements and in vertical mode flowed correctly. The above error also occurred with too many elements. But I need to study the above example in more detail. |
@MarceloRab btw, could you also provide |
Doctor summary (to see all details, run flutter doctor -v): [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ! Doctor found issues in 1 category. |
@MarceloRab ok, I think I found where problem is. Try to specify ScrollController() in InfiniteList as tmp solution ( |
Which is strange, since it creates controller for vertical scroll by default, if it's not specified |
@TatsuUkraine My list is inside a NotificationListener . That's why I don't add a ScrollController (). But I will test as per your recommendation. |
@MarceloRab it's just a temp if you need to make it work quickly) I will push new release with fix for this issue tomorrow |
@MarceloRab Or you can use this branch for now position-listener-bug |
@TatsuUkraine Everything was ok. As used in a PageView, there is no need for horizontal movement. But your orientation of not setting controller = null solved the problem in my tests. Horizontal scrolling worked as expected after the change. Thank you very much. You can close the topic. |
@MarceloRab new version is available (1.2.3) on pub.dart. This version contains fixes for this issue with a horizontal scroll. Also it fixes standalone Also Example project was updated with an example of |
The following NoSuchMethodError was thrown building _StickySliverListItem(dependencies:
I/flutter (31517): [MediaQuery], state: _StickySliverListItemState#030fb):
I/flutter (31517): The method 'addListener' was called on null.
I/flutter (31517): Receiver: null
I/flutter (31517): Tried calling: addListener(Closure: () => void from Function 'markNeedsPaint':.)
The text was updated successfully, but these errors were encountered: