Replies: 3 comments 2 replies
-
Can you wrap the BeamPage in a RearchConsumer? If so, do that. Not sure what “state” and “data” do, but perhaps you could pass something in there too. finally, if you can’t do one of the above, you can do a CapsuleContainerProvider.containerOf(context) |
Beta Was this translation helpful? Give feedback.
-
Don't think so, because
Seems they hold route info, but also don't think I would be able to prop drill a
So seems I will need this. I understand you didn't create an extension helper to simplify this, because this is not a preferred use, but would you consider to add it with a big warning? |
Beta Was this translation helpful? Give feedback.
-
extension BuildContextExtesion on BuildContext {
@Deprecated(
'''Not really insecure, but not recommended to use. Should be only used on a
situation where some third party code logic prevents to chain it with the
Widget tree. Routing could be a legitim scenario''',
)
CapsuleContainer get insecureCapsuleContainer =>
CapsuleContainerProvider.containerOf(this);
}
``` |
Beta Was this translation helpful? Give feedback.
-
This code is a Route in
Beamer
:It would be interesting to have an extension on
BuildContext
to access theCapsuleContainer
. In this case I need it to access mylanguageCapsule
to do some translations here.Beta Was this translation helpful? Give feedback.
All reactions