1 min readJan 11, 2019
In initState() you won’t get the context. So how will you pass the context in the of() method of the bloc provider ? Move your fetchData method to didChangeDependencies() after you pass the context to the Bloc Provider.
In initState() you won’t get the context. So how will you pass the context in the of() method of the bloc provider ? Move your fetchData method to didChangeDependencies() after you pass the context to the Bloc Provider.
Google certified Android app developer | Flutter Developer | Computer Vision Engineer | Gamer