'How can I apply Navigator.pop given the status of a provider within a ModalBottomSheet flutter?
I have the following method that launches a bottom sheet modal and inside that modal, I have a button that is responsible for carrying out a process,
the button calls a method of a provider and within that method I have several status changes, what I want is that when the status is Payed the modal closes automatically, I've already tried adding Navigator.pop, any suggestions?
The _toPay method triggers the process to make the payment and calls the provider's register method.
This is the provider method
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|