Closed Ascenio closed 3 years ago
Hi @Ascenio 👋 Thanks for opening an issue!
But I think that's kinda confusing because the onGenerateRoute can achieve similar behavior, as you get to decide when to pop routes and also trigger events.
context.flow<T>().complete
should be used to complete the entire flow. Can you provide some more context around how you'd exit the entire flow from onGeneratePages
? In onGeneratePages
you can control what the current navigation stack is but you can't exit the entire flow. Thanks! 🙏
After I tried the example from the repo it made sense. Thanks for responding and making the package, sounds very helpful. Actually the naming is nice, my problem was just that because I didn't know what the package was for, the name of the method didn't made sense. Good job.
Keep it up :smiley:
The first time I read the docs, I wasn't really sure what was the use of
context.flow<T>().complete
. I mean, in the source there's a comment where it says it triggersonComplete
method, which cause a pop in the navigation (if I understood correctly). But I think that's kinda confusing because theonGenerateRoute
can achieve similar behavior, as you get to decide when to pop routes and also trigger events. I think either the complete should get a different name or there should be a more in depth description about it in the README, with hints to when to use or some examples, maybe.