dismissFlowView method
Call this function if you wish to dismiss the view.
Parameters
view: an AdaptyUIFlowView object, for which is representing the view.destroy: whether to release the view along with dismissing it. Withtrue, the default, the view is released and presentFlowView on it fails afterwards — call createFlowView again to show the flow once more. Passfalseto keep the view alive, so it can be presented again and resumes where the user left it, with the screen they were on and the state the flow had built up. A view kept alive this way is held until it is dismissed withdestroy: true.
Implementation
Future<void> dismissFlowView(
AdaptyUIFlowView view, {
bool destroy = true,
}) async {
return Adapty()._invokeMethod<void>(
Method.dismissFlowView,
(data) => null,
{Argument.id: view.id, Argument.destroy: destroy},
);
}