Sagar Suri
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.

--

--

Sagar Suri
Sagar Suri

Written by Sagar Suri

Google certified Android app developer | Flutter Developer | Computer Vision Engineer | Gamer

No responses yet