简体   繁体   English

使用不包含 TaharatBloc 类型的 Bloc 的上下文调用 BlocProvider.of()

[英]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.

相关问题 Flutter 使用不包含 Bloc 类型的上下文调用的 BLoC BlocProvider.of() - Flutter BLoC BlocProvider.of() called with a context that does not contain a Bloc of type BlocProvider.of() 使用不包含 TrackingBloc 类型的 Bloc 的上下文调用 - BlocProvider.of() called with a context that does not contain a Bloc of type TrackingBloc 使用不包含 FicheMvtBloc 类型的 Bloc 的上下文调用 BlocProvider.of() - BlocProvider.of() called with a context that does not contain a Bloc of type FicheMvtBloc BlocProvider.of() 使用不包含 OfflineBloc 类型的 Bloc 的上下文调用 - BlocProvider.of() called with a context that does not contain a Bloc of type OfflineBloc BlocProvider.of() 调用的上下文不包含 WeatherBloc 类型的 Bloc/Cubit - BlocProvider.of() called with a context that does not contain a Bloc/Cubit of type WeatherBloc Flutter:使用不包含 Bloc 类型的上下文调用 blocprovider.of() - Flutter: blocprovider.of() called with a context that does not contain a Bloc of type 使用不包含 Bloc 类型的上下文调用 BlocProvider.of() - BlocProvider.of() called with a context that does not contain a Bloc of type BlocProvider.of() 使用不包含 CLASS 类型的 Bloc 的上下文调用 - BlocProvider.of() called with a context that does not contain a Bloc of type CLASS 使用不包含 Bloc 类型的上下文调用 Flutter BlocProvider.of() - Flutter BlocProvider.of() called with a context that does not contain a Bloc of type BlocProvider.of() 调用的上下文不包含 MyBloc 类型的 Bloc/Cubit - BlocProvider.of() called with a context that does not contain a Bloc/Cubit of type MyBloc
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM