Search code examples
fluttergridviewrangeruntime-error

Another exception was thrown: RangeError (index): Invalid value: Only valid value is 0: 27


enter image description here

This is the part of the code where I use GrieView...

I am fetching a json list from an API but I keep getting this error enter image description here

on the emulator, it only shows one of the products and the rest it says RangeError (index): Invalid value: Only valid value is 0: 27 ...

Please help me, what am I doing wrong.


Solution

  • verify that the variable value.products contains elements