Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RangeError (index): Index out of range: no indices are valid: 0

I got this when I was using Hive Database in Flutter. Find out answer below

like image 834
vivek yadav Avatar asked Apr 04 '20 11:04

vivek yadav


1 Answers

I was getting the same error. when I was trying to add data into hive database using putAt(), but from documantion i found out that putAt() can only be used for the existing index. so switch putAt() instruction with add(). That solved the error.

I know the question is old, but I hope it could help someone.

like image 147
vivek patel Avatar answered Sep 20 '22 20:09

vivek patel