Rick Chin
 · Aspiring to build software that people will love

Alternative approach to having local variables in Action Blocks?

Actions & Logic

I have a number of App level Action Blocks that must manipulate data to provide a result. You cannot modify passed in parameters, and you cannot create local vars within the Action Block. So I have resorted to creating App State vars that I use within these Action Blocks.

The big issue is the persistent danger of having simultaneous executions of these Action Blocks modify the same App State var. Which could lead to debugging nightmares. As my app gets more sophisticated, this an inevitability.

What am I missing? This seems to be pretty rudimentary capability that does not exist in FlutterFlow. Is there a better alternative approach that I am supposed to using?

Thank for any insights!

What have you tried so far?

Use of App State vars as an alternative to having local vars within Action Blocks.

Did you check FlutterFlow's Documentation for this topic?
Yes
3
11 replies