Is there a way to make context available in the initState function?
Hi all! I'm trying to implement the bloc architecture. I'm using a InheritedWidget (named Provider) that allows me to get any of the "blocs" (which are divided according to function). What seems weird to me is that I can't get the bloc in my initState, only in the Build function. Is there a way to make context available in the initState function?
To be more clear, I want to call a function just once (having context), instead of calling it multiple times (like when it's being called inside Build).
To be more clear, I want to call a function just once (having context), instead of calling it multiple times (like when it's being called inside Build).
No any search results
You already invited:
1 Answers
Liam
Upvotes from: