-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Out of Range Error on Swap Animation #459
Comments
Here we have a large scroll page with a lot of un-readable code. |
@imaNNeoFighT |
@imaNNeoFighT you can try to use a VPN to get around Github’s ban or you can click on the zip file in the how to reproduce. |
No. My account is restricted, not my ip. |
@imaNNeoFighT Then make sure you're signed out of your account. You don't need to be signed in to view a gist. If that doesn't work try to also use a VPN. |
Hey, I don't know if your problem still exists but I ran into a similar exception. You can check out my PR #643 which solved my problem. |
Looks like that might fix it. I'll give it a test. |
@JtheSaw Please provide your reproducible code here, and mention this issue in your PR's description. |
I can confirm it's still happening on |
@BaranMichal25 Do you have some reproducible code that you could share in the PR #643 ? |
Can you please check it with the latest version of flutter and fl_chart? |
I will close it. |
Describe the bug
When I use a swap animation an out of range error outputs, but this doesn't crash the app. It does make part of the view disappear for a short period of time. I think it may be because I am switching between sets of data with different amounts of data. I'm currently setting the swap animation to 0 as a workaround, which fixes the error, but I would like to use an animation. You can take a look at the code in the file, or the code I commented below this issue.
The following RangeError was thrown during paint():
RangeError (index): Invalid value: Not in inclusive range 0..4: 5
The relevant error-causing widget was:
LineChart file:///Users/elifront/Documents/bomber_barbell/lib/dataDetail.dart:300:20
When the exception was thrown, this was the stack:
#0 List.[] (dart:core-patch/growable_array.dart:177:60)
#1 _GraphState.mainData. (package:bomber_barbell/dataDetail.dart:382:29)
#2 LineChartPainter._drawTitles (package:fl_chart/src/chart/line_chart/line_chart_painter.dart:944:53)
#3 LineChartPainter.paint (package:fl_chart/src/chart/line_chart/line_chart_painter.dart:117:5)
#4 RenderCustomPaint._paintWithPainter (package:flutter/src/rendering/custom_paint.dart:531:13)
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#ad344
... parentData: (can use size)
... constraints: BoxConstraints(w=326.0, h=162.8)
... size: Size(326.0, 162.8)
RenderObject: RenderCustomPaint#ad344
parentData: (can use size)
constraints: BoxConstraints(w=326.0, h=162.8)
size: Size(326.0, 162.8)
════════════════════════════════════════════════════════════════════════════════════════════════════
To Reproduce
dataDetail.dart.zip
gist link
This code is also in the first comment below if you would prefer to look at it that way, but the formatting didn't work well, so you may prefer to just use the file.
Versions
The text was updated successfully, but these errors were encountered: