flowViewDidPerformAction method

void flowViewDidPerformAction(
  1. AdaptyUIFlowView view,
  2. AdaptyUIAction action
)

If the user presses the close button, this method will be invoked.

The default implementation dismisses the view on CloseAction only:

view.dismiss()

AndroidSystemBackAction is delivered but not handled by default — if you want the Android system back button to close the flow, dismiss it yourself.

Parameters

Implementation

void flowViewDidPerformAction(AdaptyUIFlowView view, AdaptyUIAction action) {
  switch (action) {
    case const CloseAction():
      view.dismiss();
      break;
    case OpenUrlAction(:final url, :final openIn):
      AdaptyUI().openUrl(url, openIn: openIn);
      break;
    default:
      break;
  }
}