Skip to content

Commit 121e0a8

Browse files
committed
Fix the Flutter SDK callouts
1 parent abcbe64 commit 121e0a8

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

fern/docs/pages/sdks/mobile/flutter/features.mdx

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ To access certain features of the DevRev SDK, user identification is required.
66

77
The identification function should be placed appropriately in your app after the user logs in. If you have the user information available at app launch, call the function after the `DevRev.configure(appID:)` method.
88

9-
<Callout intent="note">
9+
<Callout intent="tip">
1010
On iOS, if you haven't previously identified the user, the DevRev SDK will automatically create an anonymous user for you immediately after the SDK is configured.
1111
</Callout>
1212

13-
<Callout intent="note">
13+
<Callout intent="tip">
1414
The `Identity` structure allows for custom fields in the user, organization, and account traits. These fields must be configured through the DevRev app before they can be used. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).
1515
</Callout>
1616

@@ -52,7 +52,7 @@ For security reasons we **strongly recommend** that the token exchange is execut
5252
2. Open the **PLuG Tokens** page.
5353
3. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
5454

55-
<Callout intent="note">
55+
<Callout intent="warning">
5656
Ensure that you copy the generated application access token, as you cannot view it again.
5757
</Callout>
5858

@@ -81,7 +81,7 @@ curl \
8181

8282
The response of the API call will contain a session token that you can use with the verified identification method in your app.
8383

84-
<Callout intent="note">
84+
<Callout intent="warning">
8585
As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
8686
</Callout>
8787

@@ -101,11 +101,11 @@ You can update the user's information using the following method:
101101
DevRev.updateUser(identity)
102102
```
103103

104-
<Callout intent="note">
104+
<Callout intent="warning">
105105
The `userID` property cannot be updated.
106106
</Callout>
107107

108-
<Callout intent="note">
108+
<Callout intent="tip">
109109
The identification functions are asynchronous. Ensure you wrap them in a `Task` when calling from synchronous contexts.
110110
</Callout>
111111

@@ -161,15 +161,18 @@ The `Identity` class contains the following properties:
161161
| `organizationTraits` | `OrganizationTraits?` || Additional information about the organization |
162162
| `accountTraits` | `AccountTraits?` || Additional information about the account |
163163

164-
> [!NOTE]
165-
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
164+
<Callout intent="note">
165+
The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
166+
</Callout>
166167

167168
#### UserTraits
168169

169170
The `UserTraits` class contains detailed information about the user:
170171

171-
> [!NOTE]
172-
> All properties in `UserTraits` are optional.
172+
<Callout intent="note">
173+
All properties in `UserTraits` are optional.
174+
</Callout>
175+
173176
| Property | Type | Description |
174177
|----------|------|-------------|
175178
| `displayName` | `String?` | The displayed name of the user |
@@ -182,8 +185,10 @@ The `UserTraits` class contains detailed information about the user:
182185

183186
The `OrganizationTraits` class contains detailed information about the organization:
184187

185-
> [!NOTE]
186-
> All properties in `OrganizationTraits` are optional.
188+
<Callout intent="note">
189+
All properties in `OrganizationTraits` are optional.
190+
</Callout>
191+
187192
| Property | Type | Description |
188193
|----------|------|-------------|
189194
| `displayName` | `String?` | The displayed name of the organization |
@@ -197,8 +202,10 @@ The `OrganizationTraits` class contains detailed information about the organizat
197202

198203
The `AccountTraits` class contains detailed information about the account:
199204

200-
> [!NOTE]
201-
> All properties in `AccountTraits` are optional.
205+
<Callout intent="note">
206+
All properties in `AccountTraits` are optional.
207+
</Callout>
208+
202209
| Property | Type | Description |
203210
|----------|------|-------------|
204211
| `displayName` | `String?` | The displayed name of the account |
@@ -213,10 +220,6 @@ The `AccountTraits` class contains detailed information about the account:
213220

214221
Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. The support chat feature can be shown as a modal screen from the top-most screen.
215222

216-
<Callout intent="note">
217-
This feature requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
218-
</Callout>
219-
220223
```dart
221224
DevRev.showSupport();
222225
```
@@ -241,10 +244,6 @@ Setting this flag to true applies the system's default behavior for opening link
241244

242245
## Analytics
243246

244-
<Callout intent="note">
245-
This feature requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
246-
</Callout>
247-
248247
The DevRev SDK allows you to send custom analytic events by using a properties map. You can track these events using the following function:
249248

250249
```dart
@@ -301,7 +300,7 @@ You can add custom properties to the session recording to help you understand th
301300
DevRev.addSessionProperties(properties);
302301
```
303302

304-
To clear the session properties in scenarios such as user logout or when the session ends, use the following method:
303+
To clear the session properties in scenarios such as user logout or when the session ends, use the following method:
305304

306305
```dart
307306
DevRev.clearSessionProperties();

fern/docs/pages/sdks/mobile/flutter/quickstart.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To get the latest version of the SDK, you can check the [pub.dev page](https://p
3030
2. Under **PLuG settings** copy the value under **Your unique App ID**.
3131
3. After obtaining the credentials, you can configure the DevRev SDK in your app.
3232

33-
<Callout intent="note">
33+
<Callout intent="warning">
3434
The DevRev SDK must be configured before you can use any of its features.
3535
</Callout>
3636

@@ -68,7 +68,7 @@ A sample app with use cases for the DevRev SDK for Flutter has been provided as
6868
```sh
6969
flutter run -d ios
7070
```
71-
71+
7272
Additional Steps for iOS before running the app:
7373
1. Change the minimum iOS deployment target version to `15.0`.
7474
2. Navigate to the `ios` directory and perform `pod install`.

0 commit comments

Comments
 (0)