title: setState variable using a different name
body: <p>I'm trying to run the following code:</p>
  
  <pre><code>bool isCollapsed;
  bool isClosed;
  
  void myFunc(bool isDone){
    if (condition) {
      setState(() =&gt; isDone = true);
    }
  }
  
  ...
  
      myFunc(isCollapsed);  // somewhere in the code
  
  ...
  
      myFunc(isClosed);  // somewhere in the code
  </code></pre>
  
  <p>Basically I want to have one function for two state variables, so I'm trying to pass the state variable into the function. But that obviously does not work. I've heard there is no variable representation in Dart web or Flutter allowed (only Dart server VM), I've found no workaround myself.</p>