bihire boris
bihire boris

Reputation: 1662

How to access bloc from another page

Ok so I have a running to app, with a bunch blocs along the way going down the tree.

I have a page that is opened by a notification and I'd like processes in that page to update some of those blocs.

with something like redux it'd probably be easy with a "single source of truth" you can access anywhere.

how can I accomplish that.

Upvotes: 1

Views: 572

Answers (1)

Rahul
Rahul

Reputation: 5049

You can have that in bloc with cache initialising bloc objects.

But in case you want same bloc instance object in various routes, you will have to Provide them before your navigator (which is typically MaterialApp widget.)

Upvotes: 2

Related Questions