════════flutter: BlocProvider.ofThe context you used comes from a widget above the BlocProvider.
flutter: 2.You used MultiBlocProvider and didn't explicity provide the <em
所以我有屏幕ExploreScreen,它启动了我的BLoC BLoC在这个屏幕中,有一个按钮导航到一个新的屏幕FilterScreen。在FilterScreen中,我想添加一个影响两个屏幕的新事件。现在的问题是,我收到了这个错误消息(onError Bad state:无法在调用之后添加新事件)。如果不使用MaterialApp包装BlocProvider,这是可能的吗?我只想让本地集团进入两个屏幕。<Re
Stateful: void initState() { super.initStateE/flutter ( 7920): No ancestor could be found starting from the context that was passed to BlocProvider.ofBlocProvider.of (package:flutter</
当我的区块处于特定状态时,我正在尝试导航到新页面。然而,现在无论我何时尝试这样做,我都会得到以下错误:
I/flutter (25673): Another exception was thrown: setState() or markNeedsBuild在下面的代码中,我正在做一些调度,这里我也在检查我的某个区块的当前状态是否特定,然后导航到一个新屏幕。,有没有办法从BlocBuilder导航到一个新的屏幕?我尝试了什么:我尝试给出不同的上下文,传递它,甚