Solution 1 :
You defined the map Variable in the top, you don’t need to define it again, just set the value for variable in the initState function.
initState(){
super.initState();
map = {};
loadData();
}
Problem :
[](https://i.stack.imgur.com/p5rxI.p[](https://i.stack.imgur.com/bR0SI.png)ng)
I tried to load data from local file and put them dynamically in the app. But error occur while debugging code.
Comments
Comment posted by Rahul
on line 27, you are declaring local variable map. Change it to
Comment posted by OMi Shah
also, this doesn’t make sense to initialise the