Getting started
With Adapty, you can create and run paywalls and A/B tests at different points in your app user's journey, such as Onboarding, Settings, etc. These points are called Placements. A placement in your app can manage multiple paywalls or A/B tests at a time, each made for a certain group of users, which we call Audiences. Moreover, you can experiment with paywalls, replacing one with another over time without releasing a new app version. The only thing you hardcode in the mobile app is the placement ID.
The Adapty plugin keeps your paywall updated with the latest products from your Adapty Dashboard. It fetches the product data and shows it on your paywall, handles purchases, and checks the user’s access level to see if they should get paid content.
To get started, just add the Adapty Plugin to your FlutterFlow project and initiate it as shown below.
Add the Adapty plugin as a dependency
- In the FlutterFlow Dashboard, open your project, and then click Settings and Integrations from the left menu.
- In the App Settings section on the left, select Project dependencies.
- In the Project Dependencies window, click the Add Dependency button.
-
In the FlutterFlow Libraries field, enter
adapty-xtuel0
. -
Click the Add button.
-
For
YOUR_API_KEY
in the Adapty window, copy the Public SDK key from the App Settings -> General tab in the Adapty Dashboard.
The Adapty FF Plugin will now be added as a dependency to your project. In the Adapty FF Plugin window, you’ll find all the Adapty resources that have been imported into your project.
Call the new activation action at application launch
-
Navigate to
main.dart
in the Custom Code section. -
Click the plus (+) button and choose
activate
. -
Click Save.
Initiate Adapty plugin
For the Adapty Dashboard to recognize your app, you’ll need to provide a special key in FlutterFlow.
- In your FlutterFlow project, open Settings and Integrations -> Permissions from the left menu.
- In the opened Permissions window, click the Add Permission button.
- In both the iOS Permission Key and Android Permission Key field, paste
AdaptyPublicSdkKey
. - For the Permission Message, copy the Public SDK key from the App Settings -> General tab in the Adapty Dashboard. Each app has its own SDK key, so if you have multiple apps, make sure you grab the right one.
After completing these steps, you'll be able to call your paywall in your FlutterFlow app and enable purchases through it.
What's next?
- Create an action flow for handling Adapty paywall products and their data in FlutterFlow.
- Map the received data to the paywall you designed in FlutterFlow.
- Set up the purchase button on your paywall to process transactions through Adapty when clicked.
- Finally, add subscription status checks to determine whether to display paid content to the user.