I am new to Flutter. So sorry if my question is silly...
In Flutter is there a way to see which line throws an error?
E.g. I have this in console.
And this in the stimulator.
Can I understand from it which line throws it?
Using the console2020欧洲杯手机版注册See all the files in blue on the console? They represent all files (yours and those from the Flutter SDK and libraries) connected to the error message.
2020欧洲杯手机版注册There is a high chance that the line that throws an/the error is not from the libraries but from your own code. So, what do you have to do?
2020欧洲杯手机版注册Scan all files in blue that are from your own code and look for the one that has the strongest relationship with the error message.
For example, in your case,
story.dart is your own code.
Ctrl + click on
story.dart files in blue to see the line that may have caused the error/exception. In your case, there is a high chance that you are trying to read or delete an element from an empty list.
You can also use the VSCode debugger to do this