I am new to flutter and when I want to call my context in InitState it throws an error :
which is about
BuildContext.inheritFromWidgetOfExactType
but then I use did
you can still use context in initState() method, its hack buts works, all you need to do is sought of delay whatever you will need to execute that has context in it like so:
@override
void initState() {
Future.delayed(Duration.zero).then((_) {
// you code with context here
});
super.initState();
}