RangeError (index): Invalid value: Valid value range is empty: 0

2,596 views
Skip to first unread message

Prashant Nigam

unread,
Feb 5, 2021, 2:36:37 PM2/5/21
to Flutter Development (flutter-dev)
whenever I tried to run my app first time it will show an error like this 
Capture.PNG
this image shows the same data in all the card

RangeError (index): Invalid value: Valid value range is empty: 0

but if I run its again by using ctrl+s its will work fine and all the error are gone 

Capture.PNG

this error is showing on screen only a few seconds after 5 6 second its display the wrong data until I refresh the application

Suzuki Tomohiro

unread,
Feb 5, 2021, 3:37:14 PM2/5/21
to Prashant Nigam, Flutter Development (flutter-dev)
Set a breakpoint to HomeScreen.dart line 35. Make it conditional where the list is empty.

(I looked at HomeScreen.dart in the pastebin. It looks fine; I couldn't identify a bug. The debugger with breakpoints is more capable than my eyes)


--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/8e77721e-e68f-4ffa-8489-51182000563en%40googlegroups.com.

36 Prashant Nigam

unread,
Feb 6, 2021, 10:38:29 AM2/6/21
to Suzuki Tomohiro, Flutter Development (flutter-dev)
Ok, will do that. 
Reply all
Reply to author
Forward
0 new messages