[英]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我试图路由我的 TaharatPage,但我遇到了这样的错误
The following assertion was thrown building TaharatGeneralPage(dirty): BlocProvider.of() called with a context that does not contain a Bloc of type TaharatBloc.
在构建 TaharatGeneralPage(dirty) 时引发了以下断言:使用不包含 TaharatBloc 类型的 Bloc 的上下文调用 BlocProvider.of()。
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您没有使用生成的路线,而是使用命名导航而不是提供新的 MaterialPageRoute
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.