Skip to content
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

Non-fatal null check operator issue #15

Closed
Cee-Ng opened this issue Aug 23, 2021 · 3 comments
Closed

Non-fatal null check operator issue #15

Cee-Ng opened this issue Aug 23, 2021 · 3 comments

Comments

@Cee-Ng
Copy link

Cee-Ng commented Aug 23, 2021

Using fading_edge_scrollview 2.0.0, and I found this issue being reported quite often in our crashlytics console, which seems to point to an issue with the fact _isScrolledToEnd can be null based off the line it points to.
`

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown Instance of 'ErrorDescription'.
at ScrollPosition.maxScrollExtent(ScrollPosition.java:140)
at _FadingEdgeScrollViewState._postFrameCallback(_FadingEdgeScrollViewState.java:206)
at SchedulerBinding._invokeFrameCallback(SchedulerBinding.java:1144)
at SchedulerBinding.handleDrawFrame(SchedulerBinding.java:1090)
at SchedulerBinding._handleDrawFrame(SchedulerBinding.java:998)

@alex-myznikov
Copy link

alex-myznikov commented Sep 18, 2021

I have the same issue. It turns to be that the issue originates from the ScrollPosition.maxScrollExtent, which is declared as a non-nullable in scroll_position.dart, while it still can be null in some cases. It can be fixed for now by checking _controller.position.hasContentDimensions each time before _controller.position.maxScrollExtent in fading_edge_scrollview.dart.

@mponkin Can we expect this issue to be checked and fixed any time soon? Shall I submit a pull request for it?

@mponkin
Copy link
Owner

mponkin commented Sep 20, 2021

Published version 2.0.1 with fix
@alex-myznikov Thanks for explanation. I was unable to understand the problem at first glance.
I was unable to test if fix is working, because I've never reproduced original issue, so please report if it still happen

@alex-myznikov
Copy link

alex-myznikov commented Sep 23, 2021

Hi, thank you! I've tested the fix and it seems to work well in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants