Skip to content

Commit 27013c4

Browse files
committed
Added drawer action
1 parent 88f89cc commit 27013c4

File tree

2 files changed

+80
-4
lines changed

2 files changed

+80
-4
lines changed

docs/resources/ui/pages/page-elements.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,82 @@ of an app without cluttering the main interface.
154154

155155
Using a similar approach, you can also add an End Drawer to your page.
156156

157+
### Drawer [Action]
158+
159+
Using this action, you can open and close the drawers with a tap of a button. For example, opening the drawer from the widget placed outside the Appbar and closing it from the widget placed inside the drawer.
160+
161+
<div style={{
162+
position: 'relative',
163+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
164+
height: 0,
165+
width: '100%'}}>
166+
<iframe
167+
src="https://demo.arcade.software/1kiL82Ri7aIzIn0TyHGy?embed&show_copy_link=true"
168+
title=""
169+
style={{
170+
position: 'absolute',
171+
top: 0,
172+
left: 0,
173+
width: '100%',
174+
height: '100%',
175+
colorScheme: 'light'
176+
}}
177+
frameborder="0"
178+
loading="lazy"
179+
webkitAllowFullScreen
180+
mozAllowFullScreen
181+
allowFullScreen
182+
allow="clipboard-write">
183+
</iframe>
184+
</div>
185+
<p></p>
186+
187+
188+
#### Types of drawer action
189+
190+
There are three types of actions you can add to the drawer.
191+
192+
- **Open Drawer**: Opens the regular drawer.
193+
- **Open End Drawer**: Opens the end drawer.
194+
- **Close Drawers**: Closes all the open drawers.
195+
196+
197+
Go to your project page on FlutterFlow and follow the steps below to define the Action to any widget.
198+
199+
1. Select the **Widget** (e.g. IconButton, Button) on which you want to define the action.
200+
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.
201+
1. Click on the **+ Add Action**.
202+
2. On the right side, search and select the **Drawer** action.
203+
3. Select the **Drawer Action Type** among the **Open Drawer**, **Open End Drawer**, and **Close Drawers.**
204+
4. Click **Close**.
205+
206+
<div style={{
207+
position: 'relative',
208+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
209+
height: 0,
210+
width: '100%'}}>
211+
<iframe
212+
src="https://demo.arcade.software/b1KwyEEqfqH7orND2mkc?embed&show_copy_link=true"
213+
title=""
214+
style={{
215+
position: 'absolute',
216+
top: 0,
217+
left: 0,
218+
width: '100%',
219+
height: '100%',
220+
colorScheme: 'light'
221+
}}
222+
frameborder="0"
223+
loading="lazy"
224+
webkitAllowFullScreen
225+
mozAllowFullScreen
226+
allowFullScreen
227+
allow="clipboard-write">
228+
</iframe>
229+
</div>
230+
<p></p>
231+
232+
157233
## Nav Bar
158234

159235
The NavBar (or Navigation Bar) allows you to quickly navigate between pages of

firebase.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,12 +420,12 @@
420420
},
421421
{
422422
"source": "/widgets-and-components/widgets/page-elements/drawer",
423-
"destination": "/resources/ui/pages/scaffold-elements",
423+
"destination": "/resources/ui/pages/scaffold-elements#drawers",
424424
"type": 301
425425
},
426426
{
427427
"source": "/widgets-and-components/widgets/page-elements/enddrawer",
428-
"destination": "/resources/ui/pages/scaffold-elements",
428+
"destination": "/resources/ui/pages/scaffold-elements#end-drawer",
429429
"type": 301
430430
},
431431
{
@@ -815,7 +815,7 @@
815815
},
816816
{
817817
"source": "/actions/actions/navigation/close-dialog-drawer-etc.",
818-
"destination": "/",
818+
"destination": "/resources/ui/pages/scaffold-elements#drawer-action",
819819
"type": 301
820820
},
821821
{
@@ -1025,7 +1025,7 @@
10251025
},
10261026
{
10271027
"source": "/actions/actions/widget-ui-interactions/drawer",
1028-
"destination": "/resources/ui/pages/scaffold-elements",
1028+
"destination": "/resources/ui/pages/scaffold-elements#drawers",
10291029
"type": 301
10301030
},
10311031
{

0 commit comments

Comments
 (0)