Flutter Error: RangeError (index): Invalid value: Not in range 0..2, inclusive: 3

后端 未结 5 1820
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 00:49

I am using a long list in flutter. All the items are rendering fine but also following error :

RangeError (index): Invalid value: Not in range 0..2, inclusive: 3         


        
5条回答
  •  情话喂你
    2021-02-05 01:29

    I had this problem inside a GridView, but it had nothing to do with my GridView. I was splitting addresses by commas, ex addresses[index].split(',')[0], but I came across a address that had no commas which is why I suddenly got this error. Look closely through the debug console to find the exact line of the error, and test every piece of code in your GridView to pinpoint the error.

提交回复
热议问题