|
| 1 | +--- |
| 2 | +title: Widget Amimations |
| 3 | +sidebar_position: 1 |
| 4 | +--- |
| 5 | +import slideGif from '@site/static/img/animations/animation_gifs/fade.gif'; |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +Widget animations allow you to animate an entire widget. |
| 10 | + |
| 11 | +<!-- <gif> --> |
| 12 | + |
| 13 | +## Applying widget animations |
| 14 | +To add an animation to a widget, you'll need to go to the property panel for the widget and select the animations tab. |
| 15 | + |
| 16 | +Widget animations can be triggered when the page (or widget) is loaded, or can be triggered as an action. |
| 17 | + |
| 18 | + |
| 19 | +<!-- TO DO anotated screenshot --> |
| 20 | + |
| 21 | +When you create a widget animation, you'll sepcify: |
| 22 | + |
| 23 | +- The animation effect |
| 24 | +- The animation's curve |
| 25 | +- Any variables specific to the animation |
| 26 | + |
| 27 | +## Types of widget animation effects |
| 28 | +FlutterFlow supports a variety of animation effects |
| 29 | + |
| 30 | +| Animation Effect | Description | Example | |
| 31 | +| ----- | ----- | ----- | |
| 32 | +| **Fade** | Makes the widget gradually appear or disappear | <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" />| |
| 33 | +| **Slide** | Changes the widget's position on the screen | <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 34 | +| **Scale** | Changes the size of the widget |<img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 35 | +| **Rotate** | Turns the widget clockwise or aniclockwise | <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 36 | +| **Shake** | Creates the shake effect on a widget | <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" />| |
| 37 | +| **Blur** | Creates a focus or un-focus effect on a widget | <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 38 | +| **Saturate** | Creates a color saturation effect on a widget |<img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 39 | +| **Tilt** | Creates a transforming effect (3D perspective) on your widget | <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 40 | +| **Flip** | Creates a flip effect on a widget| <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 41 | +| **Shimmer** | Creates a shimmer effect on a widget | <img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 42 | +| **Tint** | Creates a color changing effect on a widget |<img src={slideGif} class="xsmall-image" alt="Alt text for your GIF" /> | |
| 43 | + |
| 44 | +## Types of widget animation curves |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +## Triggering an animation on page (or widget) load |
| 49 | +There are many cases when you might want to trigger an animation when a page or widget is loaded onto the screen. |
| 50 | + |
| 51 | +Consider an eCommerce use case, where a backend query is used retrieve a list of trending products. There may be some delay between when the page is first loaded and when the actual results are displayed. To improve the user experience we can: |
| 52 | + |
| 53 | +1. Add a shimmer animation to a widget displayed when the query is still loading |
| 54 | +2. Add a fade animation to make the product details widget fade into view |
| 55 | + |
| 56 | +<!-- Add arcade --> |
| 57 | + |
| 58 | + |
| 59 | +## Triggering an animation as part of an action flow |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +## Types of widget animation curves |
| 64 | + |
| 65 | + |
0 commit comments