title: On tap, display value at a different location
body: <p>I'm trying to create a word game. I have a local json file where I'm retrieving data from. I'm able to retrieve the data and display it on the first row. What I'm trying to do is on tap of one block (on the first row), get the value and display it in order on the second row. </p>
  
  <p>I'm able to retrieve the value but I can't display it on the second row. I tested this by printing the value in the console. </p>
  
  <p><a href="https://i.stack.imgur.com/Sl64f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sl64f.png" alt="enter image description here"></a></p>
  
  <p><strong>Updated code:</strong> </p>
  
  <pre><code> body: new Container(
                child: new Center(
  // Use future builder and DefaultAssetBundle to load the local JSON file
                  child: new FutureBuilder(
                      future: DefaultAssetBundle
                          .of(context)
                          .loadString('data_repo/starwars_data.json'),
                      builder: (context, snapshot) {
                        var newData = JSON.decode(snapshot.data.toString());
                        List&lt;Widget&gt; listMyWidgets() {
                          List&lt;Widget&gt; list = new List();
                          for (var i = 0; i &lt; newData.length; i++) {
                            var word = newData[i]['word']["letters"];
                            for (var n = 0; n &lt; word.length; n++) {
                              list.add(new Text(word[n]['letter']));
                            }
                          }
                          return list;
                        }
  
                        List letters = [];
                        for (int i = 0; i &lt; listMyWidgets().length; i++) {
                          var listMyWidgetsToString =
                              listMyWidgets()[i].toString();
                          var listWidgetToList =
                              listMyWidgetsToString.replaceAll('Text("', "");
                          var completeWordList =
                              listWidgetToList.replaceAll('")', "");
                          letters.add(completeWordList);
                        }
                        return new ListView.builder(
                          itemBuilder: (BuildContext context, int index) {
                            return new Card(
                              child: new Column(
                                crossAxisAlignment: CrossAxisAlignment.stretch,
                                children: [
                                  new Column(children: [
                                    new Image.asset(newData[0]['image'])
                                  ]),
                                  new GridView.count(
                                    shrinkWrap: true,
                                    crossAxisCount: listMyWidgets().length,
                                    children: new List.generate(
                                        listMyWidgets().length,
                                        (i) =&gt; new GestureDetector(
                                              onTap: () {
                                                final int wordLength =
                                                    5; //this is a ref to the lenght of the word so you do not keep adding tiles
                                                setState(() {
                                                  (letters.length + 1) &lt;=
                                                          wordLength * 2
                                                      ? letters.add(letters[i])
                                                      : null;
                                                });
                                              },
                                              child: new Card(
                                                elevation: 5.0,
                                                color: Colors.brown[500],
                                                child: new Padding(
                                                  padding:
                                                      const EdgeInsets.all(8.0),
                                                  child: new Center(
                                                      child:
                                                          new Text(letters[i])),
                                                ),
                                              ),
                                            )),
                                  ),
                                ],
                              ),
                            );
                          },
                          itemCount: newData == null ? 0 : newData.length,
                        );
                      }),
                ),
              )
  </code></pre>