BlocProvider.of() called with a context that does not contain a Bloc of type TaharatBloc

Viewed 56

I was trying to route my TaharatPage and I'm getting such errors

The following assertion was thrown building TaharatGeneralPage(dirty): BlocProvider.of() called with a context that does not contain a Bloc of type TaharatBloc.

    No ancestor could be found starting from the context that was passed to BlocProvider.of<TaharatBloc>().

The Error The Routing The Coding

Where I was Routing it

1 Answers

You are not using the generated routes use named navigation instead of giving a new MaterialPageRoute

Related