Skip to content Skip to sidebar Skip to footer

Flutter Futurebuilder Snapshot Is Null After Database Query Until Hot Reload

I am querying database to populate listview inside build method but future builder is returning null in snapshot at first run. It gives RangeError (index): Invalid value: Valid val

Solution 1:

Call getSurahData(context) function in initState

void initState() {
  getSurahData(context)
  super.initState();
}

Post a Comment for "Flutter Futurebuilder Snapshot Is Null After Database Query Until Hot Reload"