Skip to content

Commit

Permalink
Merge branch 'FlutterFlow' into develop
Browse files Browse the repository at this point in the history
* FlutterFlow:
  Error in flow fixed
  Updated for new version (API key at the dependancy addition stage)
  Added picture to show navigation to main.dart
  Changes to prevent Merge conflict
  removed reusable content
  Removed Migration guide as not needed
  Renamed Custom files to custom code
  • Loading branch information
Lutik-sun committed Oct 25, 2024
2 parents 6017d9a + 2ea6373 commit 7bd4d4f
Show file tree
Hide file tree
Showing 17 changed files with 144 additions and 112 deletions.
Binary file added SNAGs/3.0/dartmain.snagx
Binary file not shown.
Binary file added SNAGs/activate.snagx
Binary file not shown.
Binary file added SNAGs/adaptyapikey.snagx
Binary file not shown.
Binary file modified versioned_docs/version-3.0/FF_img/activate.webp
Binary file not shown.
Binary file not shown.
Binary file modified versioned_docs/version-3.0/FF_img/check-subscription-end.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added versioned_docs/version-3.0/FF_img/dartmain.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
133 changes: 103 additions & 30 deletions versioned_docs/version-3.0/ff-check-subscription-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,127 @@ You can do this by looking at the user profile, which contains all available acc
Now, let’s allow users to purchase your product:

1. Double-click the button that should show the paid content.

2. Open the **Actions** section in the right pane if it’s not already open.

3. Open the **Action Flow Editor**.

4. In the **Select Action Trigger** window, choose **On Tap**.

5. In the **No Actions Created** window, click the **Add Conditional Action** button.

6. In the **Actions Flow Editor** window, choose **Combine Conditions**.
<Zoom>
<img src={require('./FF_img/combined-condition.webp').default}
style={{
<Zoom>
<img src={require('./FF_img/combined-condition.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

7. In the **Set Actions Arguments** section, choose `currentProfile` variable. This is the Adapty variable that holds data about the current user's profile.

<Zoom>
<img src={require('./FF_img/current-profile.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

9. Fill in the fields as follows:

| Parameter | Value |
|--------------------------|----------|
| Available Options| Data Structure Field |
| Select Field | accessLevels |
| Available Options | Filter List Items |
| Filter Conditions | Conditions -> Single Condition |

<Zoom>
<img src={require('./FF_img/filter-list-items.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

7. In the **Set Actions Arguments** section, choose `currentProfile` variable. This is the Adapty variable that holds data about the current user's profile
8. Fill in the fields as follows:

| Parameter | Value |
|--------------------------|----------|
| Available Options| Data Structure Field |
| Select Field | accessLevels |
| Available Options | List Contains Items |

9. In the **Filter Conditions** field, click **UNSET**.

10. In the **Set Variable** window, click **Conditions** -> **Single Condition**.

<Zoom>
<img src={require('./FF_img/single-condition.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

11. In the new **Set Variable** window, click **UNSET** next to **First value**.

<Zoom>
<img src={require('./FF_img/first-value.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

9. Click **UNSET**.
10. In the new **Set Variable** window, fill in the fields as follows:
| Parameter | Value |
| ----------------- | --------------------- |
| First Value | Item in List |
| Available Options | Data Structure Field |
| Select Field | accessLevelIdentifier |

| Parameter | Value |
|--------------------------|----------|
| Available Options| Data Structure Field |
| Select Field | accessLevels |
| Available Options | Is Set and Not Empty |

11. Click the **Confirm** button.
12. Click **UNSET** for the second condition.
13. In the new **Set Variable** window, fill in the fields as follows:
9. Click **Confirm**.

| Parameter | Value |
|--------------------------|----------|
| Available Options| Data Structure Field |
| Select Field | accessLevels |
| List Index Options | First |
| Available Options| Data Structure Field |
| Select Field | accessLevels |
| Available Options| Data Structure Field |
| Select Field | isActive |
10. In the **Set Variable** window, click **UNSET** next to **Second value**.

11. In the **Value** field, enter the ID of your access level, in our example we use `premium`.

<Zoom>
<img src={require('./FF_img/second-value.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

12. Click **Confirm**.



13. In the new **Set Variable** window where you returned, fill in the fields as follows:

| Parameter | Value |
|--------------------------|----------|
| Available Options| Item as Index |
| List Index Options | First |
| Available Options| Data Structure Field |
| Select Field | accessLevels |
| Available Options| Data Structure Field |
| Select Field | isActive |

<Zoom>
<img src={require('./FF_img/check-subscription-end.webp').default}
Expand All @@ -74,6 +146,7 @@ Now, let’s allow users to purchase your product:
}}
/>
</Zoom>

14. Click the **Confirm** button twice.

Now, add the actions for what happens next — if the user has the right subscription or not. Either take them to the next page or show the paywall so they can buy access.
55 changes: 40 additions & 15 deletions versioned_docs/version-3.0/ff-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'react-medium-image-zoom/dist/styles.css';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Details from '@site/src/components/Details';
import Addactivationaction from './reusable/addactivationaction.md';

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](placements). A placement in your app can manage multiple paywalls or [A/B tests](ab-tests) at a time, each made for a certain group of users, which we call [Audiences](audience). 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.

Expand Down Expand Up @@ -77,27 +76,53 @@ To get started, just [add the Adapty Plugin](ff-getting-started#add-the-adapty-p
}}
/>
</Zoom>

5. Click the **Add** button.

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.
6. For `YOUR_API_KEY` in the **Adapty** window, copy the **Public SDK key** from the [**App Settings** -> **General** tab](https://app.adapty.io/settings/general) in the Adapty Dashboard.

<Addactivationaction />
<Zoom>
<img src={require('./FF_img/adaptyapikey.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

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

1. Navigate to `main.dart` in the **Custom Files** section.
2. Click the plus (**+**) button and choose `activateAdaptyAction`.
1. Navigate to `main.dart` in the **Custom Code** section.

<Zoom>
<img src={require('./FF_img/update-activation.webp').default}
style={{
border: 'none', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>
<Zoom>
<img src={require('./FF_img/dartmain.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

2. Click the plus (**+**) button and choose `activate`.

<Zoom>
<img src={require('./FF_img/activate.webp').default}
style={{
border: '1px solid #727272', /* border width and color */
width: '700px', /* image width */
display: 'block', /* for alignment */
margin: '0 auto' /* center alignment */
}}
/>
</Zoom>

3. Click **Save**.

## Initiate Adapty plugin

Expand Down
61 changes: 0 additions & 61 deletions versioned_docs/version-3.0/ff-update-to-101.md

This file was deleted.

7 changes: 1 addition & 6 deletions versioned_sidebars/version-3.0-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -1660,12 +1660,7 @@
"type": "doc",
"label": "Adapty resources",
"id": "ff-resources"
},
{
"type": "doc",
"label": "Migration guide to version 1.0.1",
"id": "ff-update-to-101"
}
}
]
}
],
Expand Down

0 comments on commit 7bd4d4f

Please sign in to comment.