flow_builder icon indicating copy to clipboard operation
flow_builder copied to clipboard

I want to make a network request before the final step is completed

Open greenking19 opened this issue 2 years ago • 1 comments

I want to make a network request before the final step is completed. Where should I put the data for the entire process? Are there any relevant examples? At present, I am thinking of using Provider, but I think it's a bit inappropriate

greenking19 avatar Sep 15 '23 17:09 greenking19

Hey @greenking19 👋

A network request should be initiated from your bloc/cubit and it's up to your logic to handle making the request and then emitting a state which will result in completing the flow. I believe the bit you're missing here is that you can use your bloc/cubit state/part of state, as the driver of your flow which I feel is the way to go in your case.

x1z7 avatar Jan 04 '25 05:01 x1z7