fluttercandies / extended_nested_scroll_view

extended nested scroll view to fix following issues. 1.pinned sliver header issue 2.inner scrollables in tabview sync issue 3.pull to refresh is not work. 4.do without ScrollController in NestedScrollView's body
MIT License
592 stars 119 forks source link

The method 'toDouble' was called on null. #28

Closed wyzard closed 4 years ago

wyzard commented 4 years ago

Hi!

First of all thank you for this awesome lib. I have an error, however it's not consequent. I have a PageView with several pages. All of the pages contains a NestedScrollView. The relevant error is:

The following NoSuchMethodError was thrown building Builder(dirty):
The method 'toDouble' was called on null.
Receiver: null
Tried calling: toDouble()

The relevant error-causing widget was: 
  NestedScrollView-[LabeledGlobalKey<NestedScrollViewState>#c931d] file:///F:/demo/lib/module_list.dart:114:35
When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      double.> (dart:core-patch/double.dart:96:31)
#2      _NestedScrollCoordinator.hasScrolledBody (package:extended_nested_scroll_view/src/old_extended_nested_scroll_view.dart:548:27)
#3      NestedScrollViewState.build.<anonymous closure> (package:extended_nested_scroll_view/src/old_extended_nested_scroll_view.dart:366:47)
#4      Builder.build (package:flutter/src/widgets/basic.dart:6757:41)

It usually occurs when I swipe in the PageView really fast.

Do you have an idea what's going on? Thank you.

zmtzawqlp commented 4 years ago

please provide a demo for this issue, so i can try to find the issue

wyzard commented 4 years ago

My code is really large and complex, but I will try to highlight the relevant code blocks, thank you.

wyzard commented 4 years ago

It seems to be a framework error: https://github.com/flutter/flutter/issues/28351 https://github.com/flutter/flutter/issues/31195