-
Notifications
You must be signed in to change notification settings - Fork 64
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
The method 'toDouble' was called on null. #1
Comments
Please send entire code where the error occurs. |
I had the same problem, maybe depend on the way you build CollapsibleItem list. in my case...
_selectedIndex is set to zero on initState |
I have the same issue. Any solution? |
Can you guys send the code and the line number as shown by the terminal where the error is occurring. @dariolr @ReniDelonzek I'll try to see where this exception is coming from. |
Hello @RyuuKenshi , the error happens when no item is pre-selected. I fixed this on my fork, but I didn't submit it because I did a few more increments that may not be relevant here. But set _selectedItemIndex = 0; in initState should resolve |
Hi @JatinJD14296, @dariolr, @ReniDelonzek, I have implemented some changes to this package. |
The method 'toDouble' was called on null.
Receiver: null
Tried calling: toDouble()
The relevant error-causing widget was:
CollapsibleSidebar file:///Users/imac/Documents/workspace/fittrack_flutter/lib/features/home/presentation/pages/home_screen.dart:48:21
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 double.* (dart:core-patch/double.dart:36:23)
#2 _CollapsibleSidebarState.build (package:collapsible_sidebar/collapsible_sidebar.dart:177:46)
#3 StatefulElement.build (package:flutter/src/widgets/framework.dart:4681:28)
#4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4564:15)
...
ERROR MOVE ON THIS LINE...
Stack(
alignment: Alignment.topCenter,
children: [
CollapsibleItemSelection(
height: _maxOffsetY,
======> offsetY: _maxOffsetY * _selectedItemIndex,
color: widget.selectedIconBox,
duration: widget.duration,
curve: widget.curve,
),
Column(children: _items),
],
),
The text was updated successfully, but these errors were encountered: