flow_builder
flow_builder copied to clipboard
I want to make a network request before the final step is completed
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
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.