Skip to content

Commit 0383e6a

Browse files
committed
Fix build issue
1 parent c268db0 commit 0383e6a

File tree

1 file changed

+71
-2
lines changed

1 file changed

+71
-2
lines changed

docs/resources/ui/widgets/widget-commonalities.md

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When working with widgets in FlutterFlow, you'll encounter properties and featur
1515

1616
Visibility settings in FlutterFlow allow you to dynamically control when and how widgets appear in your app.
1717

18-
### Conditional Visibility
18+
### Conditional
1919

2020
**Conditional** visibility allows you to control the display of UI elements (widgets) based on specific conditions or criteria. It helps you create dynamic, personalized experiences by showing or hiding certain content.
2121

@@ -29,7 +29,7 @@ The **Show in UI Builder** toggle only affects visibility within the design canv
2929

3030
![conditional-visibility.avif](imgs/conditional-visibility.avif)
3131

32-
### Responsive Visibility
32+
### Responsive
3333

3434
The **Responsive** visibility property allows you to show or hide widgets based on device screen size—such as mobile, tablet, or desktop. By toggling each icon, you can show or hide the widget according to your design needs.
3535

@@ -431,3 +431,72 @@ Use consistent border and padding styles for buttons, cards, and containers to m
431431
</iframe>
432432
</div>
433433
<p></p>
434+
435+
## Trigger Action on Selection Change
436+
437+
Here, you will see how to trigger an action when the selection changes for any Form widget such as Dropdown, RadioButton, ChoiceChips, Slider, and RatingBar.
438+
439+
:::info
440+
To simplify, we've used the Dropdown widget as an example. However, the same instructions apply to other Form widgets as well.
441+
:::
442+
443+
<div style={{
444+
position: 'relative',
445+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
446+
height: 0,
447+
width: '100%'}}>
448+
<iframe
449+
src="https://www.loom.com/embed/1722ccd359a2401a9064f50b0ca38350?sid=9118cb06-4b88-4c69-b3ac-6ec0794b9e62"
450+
title=""
451+
style={{
452+
position: 'absolute',
453+
top: 0,
454+
left: 0,
455+
width: '100%',
456+
height: '100%',
457+
colorScheme: 'light'
458+
}}
459+
frameborder="0"
460+
loading="lazy"
461+
webkitAllowFullScreen
462+
mozAllowFullScreen
463+
allowFullScreen
464+
allow="clipboard-write">
465+
</iframe>
466+
</div>
467+
<p></p>
468+
469+
To do so:
470+
471+
1. Select the widget.
472+
2. Select **Actions** from the properties panel, and click **+ Add Action**.
473+
3. You will notice that the **Type of Action** (aka callback) is already set to **On Selected**. That means actions added under this will be called whenever the selection changes.
474+
4. Now you can add any action here.
475+
476+
Here is an example showing the snackbar message when the Dropdown selection changes.
477+
478+
<div style={{
479+
position: 'relative',
480+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
481+
height: 0,
482+
width: '100%'}}>
483+
<iframe
484+
src="https://www.loom.com/embed/1e6748c17cbb49fe869feeff30ad3eb4?sid=cfc3fb5b-262f-4e50-8213-f23ba0610100"
485+
title=""
486+
style={{
487+
position: 'absolute',
488+
top: 0,
489+
left: 0,
490+
width: '100%',
491+
height: '100%',
492+
colorScheme: 'light'
493+
}}
494+
frameborder="0"
495+
loading="lazy"
496+
webkitAllowFullScreen
497+
mozAllowFullScreen
498+
allowFullScreen
499+
allow="clipboard-write">
500+
</iframe>
501+
</div>
502+
<p></p>

0 commit comments

Comments
 (0)