Presents a flow view as a modal
Presentation options
OptionaliosPresentationStyle?: AdaptyIOSPresentationStyleiOS presentation style. Available options: 'full_screen' (default) or 'page_sheet'. Only affects iOS platform.
Sets event handlers for flow view events
OptionaleventHandlers: Partial<FlowEventHandlers> = {}set of event handling callbacks
unsubscribe - function to unsubscribe all listeners
Each event type can have only one handler — new handlers replace existing ones. Default handlers are set during view creation: DEFAULT_FLOW_EVENT_HANDLERS
onCloseButtonPress - closes the view (returns true)onAndroidSystemBack - keeps the view open (returns false)onRestoreCompleted - keeps the view open (returns false)onError - closes the view (returns true)onPurchaseCompleted - keeps the view open (returns false)onUrlPress - opens URL and keeps the view open (returns false)To retain default behavior in a custom listener, return the same value as the default implementation.
Important: Calling this method multiple times will override only the handlers you provide, keeping previously set handlers intact.
Presents an alert dialog
A config for showing the dialog.
A Promise that resolves to the AdaptyUiDialogActionType object
Use this method instead of RN alert dialogs when flow view is presented. On Android, built-in RN alerts appear behind the flow view, making them invisible to users. This method ensures proper dialog presentation above the flow view on all platforms.
If you provide two actions in the config, be sure primaryAction cancels the operation
and leaves things unchanged.
Provides methods to control created flow view