Skip to content

Commit 49ad641

Browse files
committed
Added dismiss custom dialog
1 parent 86006a4 commit 49ad641

File tree

4 files changed

+52
-4
lines changed

4 files changed

+52
-4
lines changed

docs/ff-concepts/alerts-notification/alert-dialog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ We allow you to define two types of Alert Dialog Actions:
4444
- **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.
4545
- **Custom Dialog**: This is a fully customizable dialog that you can create using [components](../../ui/components/overview.md).
4646

47-
### Adding Informational Dialog action
47+
### Adding Informational Dialog [Action]
4848

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

@@ -81,7 +81,7 @@ Follow the steps below to add this type of action to any widget:
8181
</div>
8282
<p></p>
8383

84-
### Adding Confirm Dialog action
84+
### Adding Confirm Dialog [Action]
8585

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

@@ -124,7 +124,7 @@ Follow the steps below to add this type of action to any widget:
124124
</div>
125125
<p></p>
126126

127-
### Adding Custom Dialog action
127+
### Adding Custom Dialog [Action]
128128

129129
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:
130130

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Dismiss Custom Dialog
3+
slug: /concepts/alerts-notification/dismiss-custom-dialog
4+
sidebar_position: 2
5+
tags: [Actions, Alerts & Notifications]
6+
keywords: [FlutterFlow, Actions, Alerts & Notifications, Dismiss Custom Dialog]
7+
---
8+
9+
# Dismiss Custom Dialog
10+
11+
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.
12+
13+
<div style={{
14+
position: 'relative',
15+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
16+
height: 0,
17+
width: '100%'}}>
18+
<iframe
19+
src="https://demo.arcade.software/ihrcUlB3vJ7L6Oog2Ob0?embed&show_copy_link=true"
20+
title=""
21+
style={{
22+
position: 'absolute',
23+
top: 0,
24+
left: 0,
25+
width: '100%',
26+
height: '100%',
27+
colorScheme: 'light'
28+
}}
29+
frameborder="0"
30+
loading="lazy"
31+
webkitAllowFullScreen
32+
mozAllowFullScreen
33+
allowFullScreen
34+
allow="clipboard-write">
35+
</iframe>
36+
</div>
37+
<p></p>
38+
39+
## Adding Dismiss Custom Dialog [Action]
40+
41+
Follow the steps below to add this type of action to any widget:
42+
43+
1. Select the **Widget** (e.g., Button) on which you want to add the action.
44+
2. Select **Actions** from the Properties panel (the right menu), and click **+ Add Action**.
45+
3. Search and select the **Dismiss Custom Dialog** (under *Alerts/Notifications*) action.
46+
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.
47+
48+
![Adding Dismiss Custom Dialog action](imgs/adding-dismiss-custom-dialog-action.png)
53.4 KB
Loading

firebase.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@
10901090
},
10911091
{
10921092
"source": "/actions/actions/alerts-notifications/dismiss-custom-dialog",
1093-
"destination": "/",
1093+
"destination": "/concepts/alerts-notification/dismiss-custom-dialog",
10941094
"type": 301
10951095
},
10961096
{

0 commit comments

Comments
 (0)