gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 07:58:01 25 4
gpt4 key购买 nike

我试图路由我的 TaharatPage,但我收到了这样的错误

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

最佳答案

您没有使用生成的路由,而是使用命名导航而不是提供新的 MaterialPageRoute

关于flutter - BlocProvider.of() 使用不包含 TaharatBloc 类型的 Bloc 的上下文调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66604877/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com