Flutter — Presenting visual paywalls

To present (show) a paywall view call view.present() method. You can use view from the previous step, we will introduce a new one:

try {
  await view.present();
} on AdaptyError catch (e) {
  // handle the error
} catch (e) {
  // handle the error
}

Dismissing a paywall view

You can dismiss (hide) a paywall view by calling a view.dismiss.

try {
  await view.dismiss();
} on AdaptyError catch (e) {
  // handle the error
} catch (e) {
  // handle the error
}