On Flutter I would like to pass a local bloc
to another screen.
This is how I used to pass a bloc to a new route when using the default navigator.
Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (BuildContext context) => BlocProvider.value(
value: localBloc,
child: MyPage(),
),
));
But now, I'm using the go_router
package for navigation. How can I provide the local bloc
to the screen I want using BlocProvider.value()
.