Open DarekLin opened 3 years ago
First create API_Manager object like as
API_Manager _apiManager=new API_Manager();
after doing this. Change object access scope. void initState() { _newsModel = _apiManager.getNews(); super.initState(); } It will work perfectly.
It will work perfectly.
not working.
Thanks for a great tutorial in your youtube Chanel. I am following you in a new flutter environment and I am getting an error in
void initState() { _newsModel = API_Manager().getNews(); super.initState(); }
Maybe you know how can I fix it?