FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
129 stars 26 forks source link

Code Expressions not working in animations delay in dynamically generated children #3550

Closed gspassky closed 3 months ago

gspassky commented 3 months ago

Can we access your project?

Current Behavior

Hey guys,

I have dynamically generated items (from a variable) which I want to appear one by one. So I'd like to make animations delay dependent on the item key in the list.

I've set "Code Expression" as a value of animation delay, settings it to "150curIndex" where curIndex is an argument set to the item's "Index in List". So the first item will have delay set to 0 (1500), the second - to the 150 (150*1) and so on.

However, it doesn't work. All elements appear with no delay.

Expected Behavior

Elements must appear on the page with a delay - one after one

Steps to Reproduce

  1. Create an app state variable (list)
  2. Create a column with dynamic rows inside it (based on the variable)
  3. Insert something to be displayed in a row
  4. Add a fade in animation effect on page load for this object with the delay set to a code expression "150*curIndex" where curIndex is an argument set to the item's "Index in List"

Reproducible from Blank

Bug Report Code (Required)

gs1

Visual documentation

err

Environment

- FlutterFlow version: 4.1.79+
- Platform: Windows
- Browser name and version: Chrome Latest
- Operating system and version affected:

Additional Information

No response

gspassky commented 3 months ago

Finally I figured out the problem. The Code Expression shouldn't have the return type set - then, everything works fine!

gspassky commented 3 months ago

Actually, sometimes Code Expressions don't work when Apply same duration and delay toggle being used. Placing the expression directly into each animation is a workaround. Anyway, the buggy behavior presents...

msusviela commented 3 months ago

Hi @gspassky, can you please share a bug report code for this?
You can follow this documentation to generate one:
https://docs.flutterflow.io/troubleshooting/submit-bug-reports
It'll be very useful for us in order to replicate the issue

msusviela commented 3 months ago

Closing this issue since we haven't heard back from you. If you are still facing the problem please submit a new issue. Have a great day!