title: Dynamically initialize variables (radio button values) in dart?
body: <p>Let's say I am designing a quiz with multiple-choice questions. The number of option for each question can vary. How do I name the variable dynamically? eg. Normally what we do in python is </p>
  
  <pre><code>_radValue+str(index) = -1
  </code></pre>
  
  <p>can we have something like this in dart? </p>
  
  <p>For known number of radio buttons the code I generally use is: </p>
  
  <pre><code>
    int _radioValue1 = -1;
    int _radioValue2 = -1;
    int _radioValue3 = -1;
  
  </code></pre>
  
  <p>Radio Button Widget goes like:</p>
  
  <pre><code>Column(children:
            List&lt;Widget&gt;.generate(
              widget.items,
                  (int j) =&gt; Row(
                children: List&lt;Widget&gt;.generate(
                  widget.members,
                      (int i) =&gt; Radio&lt;int&gt;(
                    value: i,
                    groupValue: groupValue,
                    onChanged: _handleRadioValueChange,
                  ),
                ),
              ),
            ),
          ),
  }
  
    void _handleRadioValueChange(int value) {
      setState(() {
        groupValue = value;
      });
    }
  </code></pre>
  
  <p>I can generate a dynamic number of radio buttons by wrapping the generated list of radioButtons. I am just not able to generate </p>
  
  <pre><code>_radioValue+(index).toString() = -1;
  
  </code></pre>
  
  <p>please help! thank you!</p>