简体   繁体   中英

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

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>().

错误 路由 编码

我在哪里路由它

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM