Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/ff-concepts/alerts-notification/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Alerts & Notifications",
"position": 8
}
199 changes: 199 additions & 0 deletions docs/ff-concepts/alerts-notification/alert-dialog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check the component URLs, they dont link to anything.

title: Alert Dialog
slug: /concepts/alerts-notification/alert-dialog
sidebar_position: 0
tags: [Actions, Alerts & Notifications]
keywords: [FlutterFlow, Actions, Alerts & Notifications, Alert Dialog]
---

# Alert Dialog

The action allows you to alert the user of important situations that require acknowledgment in the form of a pop-up or custom-designed dialog. With this feature, you can choose to display a pre-built pop-up or create a custom design that suits your specific requirements.

<div style={{
position: 'relative',
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'}}>
<iframe
src="https://demo.arcade.software/i3HbwgcbqbLyJQPRjr8a?embed&show_copy_link=true"
title=""
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>
<p></p>

### Types of Alert Dialog

We allow you to define two types of Alert Dialog Actions:

- **Informational Dialog:** To show some information the user should be aware of before interacting with the app. Contains only a single action button.
- **Confirm Dialog:** This dialog can contain two action buttons. It can trigger the subsequent action based on whether a user confirms the action. It can also be used before performing any non-revertable user action, for example, before deleting a user account.
- **Custom Dialog**: This is a fully customizable dialog that you can create using [components](../../ui/components/overview.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link doesnt work.


### Adding Informational Dialog [Action]

Follow the steps below to add this type of action to any widget:

1. Select the **Widget** (e.g., Button) on which you want to add the action.
2. Select **Actions** from the Properties panel (the right menu), and click **+ Add Action**.
3. Search and select the **Alert Dialog** (under *Alerts/Notifications*) action.
4. Set the **Alert Dialog Type** to **Informational Dialog**.
5. Provide the **Title** and **Message** for the dialog. Note: You can also set it from a variable; for example, a combined text with a value from a variable.
6. Also, enter a **Dismiss Text** that will be shown on the action button.

<div style={{
position: 'relative',
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'}}>
<iframe
src="https://demo.arcade.software/99GFeVxk2dvIX7kFatOP?embed&show_copy_link=true"
title=""
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>
<p></p>

### Adding Confirm Dialog [Action]

Follow the steps below to add this type of action to any widget:

1. Select the **Widget** (e.g., Button) on which you want to define the action.
2. Select **Actions** from the Properties panel (the right menu), and click **Open**. This will open an **Action Flow Editor** in a new popup window.
1. Click on the **+ Add Action**.
2. On the right side, search and select **Alert Dialog**.
3. Set the **Alert Dialog Type** to **Confirm Dialog**.
4. Provide the **Title** and **Message** for the dialog. Note: You can also set it from a variable; for example, a combined text with a value from a variable.
5. Now, enter a **Dismiss Text** (shown on the action button that will cancel the Action) and a **Confirm Text** (shown on the action button that will trigger the Action that you will define in the next step).
6. Now, click on the **+** button and select **Add Conditional**.
7. On the right side (**Set Condition for Action**), set the **Source** to **Confirm Dialog Response**.
1. Under the **TRUE** section, add an action that will be triggered if a user gives confirmation.
2. Under the **FALSE** section, add an action that will be triggered if a user cancels this dialog.
3. Click **Close**.

<div style={{
position: 'relative',
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'}}>
<iframe
src="https://demo.arcade.software/zlP2hl64nrid2ODbN8wb?embed&show_copy_link=true"
title=""
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>
<p></p>

### Adding Custom Dialog [Action]

Before you add this action, ensure you [create a component](../../ui/components/custom-components/getting-started.md) that you want to display as a custom dialog. Now follow the steps below to add this type of action to any widget:

1. Select the **Widget** (e.g., Button) on which you want to add the action.
2. Select **Actions** from the Properties panel (the right menu), and click **+ Add Action**.
3. Search and select the **Alert Dialog** (under *Alerts/Notifications*) action.
4. Set the **Alert Dialog Type** to **Custom Dialog** and **Select Component**.
5. It is recommended to set the appropriate **Width** and **Height** for the custom dialog.
6. Optionally, you can set the **Background** and **Barrier Color** for this dialog.

![Setting background color and barrier color](imgs/custom-dialog.avif)

7. By default, this type of action blocks the following action (if any) from triggering while this action is in progress, meaning the dialog is present on the screen. However, in some cases, you might want to allow the next action (after this) to execute, for example, making an API call immediately after showing the custom loading dialog. To do so, enable **Non Blocking** option.
8. By default, **Non Dismissble** option closes the dialog when you click outside of it. To disable this behavior, enable this option.

<div style={{
position: 'relative',
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'}}>
<iframe
src="https://demo.arcade.software/F5SinThEDKDwc337AM60?embed&show_copy_link=true"
title=""
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>
<p></p>

9. By default, the custom dialog appears in the center of the screen. However, you can use the **Dialog Alignment** property to decide where to position the dialog on the screen.

![Align custom dialog](imgs/align-custom-dialog.avif)

10. To position the dialog around the widget that opened it, enable the **Align with the Target Widget**, and then align using the **Target Alignment** property. **Tip**: If dialog goes out of the screen, enable **Avoid Overflow**.

<div style={{
position: 'relative',
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'}}>
<iframe
src="https://demo.arcade.software/DwufbH1LAEpjw1dBSRYX?embed&show_copy_link=true"
title=""
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>
<p></p>
48 changes: 48 additions & 0 deletions docs/ff-concepts/alerts-notification/dismiss-custom-dialog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Dismiss Custom Dialog
slug: /concepts/alerts-notification/dismiss-custom-dialog
sidebar_position: 1
tags: [Actions, Alerts & Notifications]
keywords: [FlutterFlow, Actions, Alerts & Notifications, Dismiss Custom Dialog]
---

# Dismiss Custom Dialog

With this action, you can easily close the [custom dialog](alert-dialog.md#adding-custom-dialog-action), providing a convenient way for users to dismiss it. This functionality is handy when you want to give users the option to close the dialog from any widget within it, like a close button.

<div style={{
position: 'relative',
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'}}>
<iframe
src="https://demo.arcade.software/ihrcUlB3vJ7L6Oog2Ob0?embed&show_copy_link=true"
title=""
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>
<p></p>

## Adding Dismiss Custom Dialog [Action]

Follow the steps below to add this type of action to any widget:

1. Select the **Widget** (e.g., Button) on which you want to add the action.
2. Select **Actions** from the Properties panel (the right menu), and click **+ Add Action**.
3. Search and select the **Dismiss Custom Dialog** (under *Alerts/Notifications*) action.
4. You can set a default value to be sent when the user closes the custom dialog. You can do so by enabling the **Has Value** option. For instance, if the dialog provides a list of colors and the user closes it without selecting any color, you can set a default color value of "Black" to be sent as the default selection.

![Adding Dismiss Custom Dialog action](imgs/adding-dismiss-custom-dialog-action.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
slug: /integrations/notifications/one-signal
title: OneSignal Notifications
description: Learn how to get started with OneSignal in your FlutterFlow app for push notifications.
tags: [OneSignal, Notifications, Integration]
sidebar_position: 1
keywords: [FlutterFlow, OneSignal, Notifications, Integration]
title: OneSignal
slug: /concepts/alerts-notification/one-signal
sidebar_position: 3
tags: [Actions, Alerts & Notifications, Integration]
keywords: [FlutterFlow, Actions, Alerts & Notifications, OneSignal]
---


# OneSignal

Integrating OneSignal lets you send emails and SMS (text messages) to your users. This can help you
get more engagement, make more sales, and keep users coming back. After you set up OneSignal, you'll
be able to easily add users to or remove them from OneSignal's subscription list.

![img.png](img.png)
![img.png](imgs/os-img.png)

:::note[Prerequisites]
- Before you begin, make sure the project is on **Blaze plan** on Firebase.
Expand All @@ -28,7 +28,7 @@ Here's a detailed, step-by-step guide to help you integrate OneSignal:
1. To get started, you need an app created on OneSignal. You can create one from
the [dashboard](https://dashboard.onesignal.com/apps).

![img_1.png](img_1.png)
![img_1.png](imgs/os-img_1.png)

1. After creating your app, activate the services you need, like SMS and Email. Go to your app
settings by clicking **App > Settings > Platforms** and then select **Activate** for the services
Expand Down Expand Up @@ -106,10 +106,10 @@ com/embed/f06e63054a2b4c94883994b61182b7d2?sid=647d815a-d53d-41dc-a569-8cc3186eb

You can find out if the user was successfuly added to the subscription by navigating to **OneSignal dashboard > App > Audience > Subscriptions**.

![img_2.png](img_2.png)
![img_2.png](imgs/os-img_2.png)

:::info[OneSignal for Supabase Users]
Currently, our OneSignal integration supports only Firebase authentication. If you want to use [**Supabase authentication**](../../authentication/supabase-auth/initial-setup.md), you may need to use [**custom code**](../../../ff-concepts/adding-customization/custom-code.md) to notify your users.
Currently, our OneSignal integration supports only Firebase authentication. If you want to use [**Supabase authentication**](../../ff-integrations/authentication/supabase-auth/initial-setup.md), you may need to use [**custom code**](../../ff-concepts/adding-customization/custom-code.md) to notify your users.
:::


Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
slug: /integrations/push-notifications
title: Push Notifications
description: Learn how to enable and use push notifications in your FlutterFlow app, including instant and scheduled notifications.
tags: [Push Notifications, Firebase Cloud Messaging, Integration]
sidebar_position: 1
keywords: [FlutterFlow, Push Notifications, Firebase Cloud Messaging, Integration]
slug: /concepts/alerts-notification/push-notifications
sidebar_position: 2
tags: [Actions, Alerts & Notifications, Integration]
keywords: [FlutterFlow, Actions, Alerts & Notifications, Push Notifications]
---


# Push Notifications

Push notifications allow you to send timely and relevant information to a user's phone. From this page, you can enable the push notification feature in your app. After enabling it, you can send the push notification instantly or schedule it to be delivered to the user's device at a specific time.
Expand All @@ -21,7 +21,7 @@ FlutterFlow uses [**Firebase Cloud Messaging**](https://firebase.google.com/docs
Before getting started with this section, ensure you have:

* Completed all steps in the
[**Firebase Setup**](../../firebase/connect-to-firebase-setup.md).
[**Firebase Setup**](../../ff-integrations/firebase/connect-to-firebase-setup.md).
* Upgraded to a [**Blaze plan**](https://firebase.google.com/pricing) for your Firebase project.
:::

Expand All @@ -48,9 +48,7 @@ Here are the steps to send push notifications:
**Please note, push notifications will not work in these scenarios:**

* Push notifications will not work on an iOS simulator. To test you will need to use a real device.
* Push notifications will not be delivered to users who are logged out of your app. To send push
notifications to users who are not logged in, consider implementing [**Anonymous Firebase
Login**](../../authentication/firebase-auth/anonymous-login.md) within your app
* Push notifications will not be delivered to users who are logged out of your app. To send push notifications to users who are not logged in, consider implementing [**Anonymous Firebase Login**](../../ff-integrations/authentication/firebase-auth/anonymous-login.md) within your app
* Push notifications will not work if you have the app open on your device.
:::

Expand All @@ -61,7 +59,7 @@ To enable push notifications:
2. Now, click on the **Deploy** button. This will create and deploy the *Cloud Functions* in your
Firebase project that are necessary for push notifications to work.

![img.png](img.png)
![img.png](imgs/img.png)

### Only for iOS: Configuring iOS app

Expand Down Expand Up @@ -118,7 +116,7 @@ You must add an Identifier to be able to send the push notifications to the iOS

To add an Identifier:

1. From your *Apple developer account* open the [**Identifiers**](https://developer.apple.com/account/resources/identifiers/list)section.
1. From your *Apple developer account* open the [**Identifiers**](https://developer.apple.com/account/resources/identifiers/list) section.

2. Click on the **(+)** button on the right side of the **Identifiers** label.

Expand All @@ -145,7 +143,7 @@ Continue with this step only if you have an APP or Bundle ID created in your dev

Add the 'Push Notifications' capability to your existing App ID in order to avoid any issues when you re-deploy your app. Here's how you do it:

1. From your *Apple developer account,* open the [**Identifiers**](https://developer.apple.com/account/resources/identifiers/list)section.
1. From your *Apple developer account,* open the [**Identifiers**](https://developer.apple.com/account/resources/identifiers/list) section.

2. Open the identifier with your existing APP ID.

Expand Down Expand Up @@ -226,20 +224,20 @@ The document reference of the user is required to send a push notification to a
Normally, you would obtain the user document reference from the Firestore document, where a field like 'created_by' stores the document reference of the post creator. However, for the sake of simplicity, let's assume that we are storing this reference in an app state variable, which looks like this:

<figure>
![img_1.png](img_1.png)
![img_1.png](imgs/img_1.png)
<figcaption class="centered-caption">User document reference in app state variable</figcaption>
</figure>

If you need to send push notifications to multiple users, consider a scenario where you want to notify all users who liked a post when someone comments on it. You can retrieve the list or array of user document references from the Firestore document or any app state variable within your app. Here's what a list of document references in an app state variable might look like:

<figure>
![img_2.png](img_2.png)
![img_2.png](imgs/img_2.png)
<figcaption class="centered-caption">Multiple user document references in app state variable</figcaption>
</figure>

:::info
Learn more about working with
[**App State variables**](../../../resources/data-representation/app-state.md).
[**App State variables**](../../resources/data-representation/app-state.md).
:::

### 2. Trigger Push Notification [Action]
Expand Down
Loading