title: how do i add a search bar for a listview.Builder with a json file?
body: <p>in my application Flutter I have a widget with this body</p>
  <pre><code>body: ListView.builder(
          itemCount: data.length,
          itemBuilder: (BuildContext context, int index) {
            return Column(
              children: &lt;Widget&gt;[
                ListTile(
                  title: Text(data[index]['name']),
                  leading: Icon(Icons.arrow_forward_ios),
                  onTap: () =&gt; {
                    Navigator.pushNamed(context, data[index]['routes'])
                    // Your Logout method
                  },
                  //title: Text(data[index]['name']),
                )
              ],
            );
          },
        ),
  </code></pre>
  <p>the variable data depends on a local json file.
  The json file is like this:</p>
  <pre><code>[
      {
          &quot;name&quot; : &quot;name&quot;,
          &quot;routes&quot; : &quot;/routes1&quot;
      },
      {
          &quot;name&quot; : &quot;name2&quot;,
          &quot;routes&quot; :  &quot;/routes2&quot;
      },
  ]
  </code></pre>
  <p>For update json file I use this code</p>
  <pre><code>Future&lt;String&gt; loadJsonData() async {
      var jsonText =
          await rootBundle.loadString('assets/file.json');
      setState(() {
        data = json.decode(jsonText);
      });
      print(jsonText);
    }
  
    @override
    // ignore: must_call_super
    void initState() {
      this.loadJsonData();
    }
  </code></pre>
  <p>with this code I have a list that makes me see the name and through 'routes' sends me to another page.</p>
  <p>I need to add a search bar, which allows me as I type a name to display only similar ones.
  For example if the list names in the json file are:
  Martin
  Mike
  James</p>
  <p>When I start typing 'M' I will see a list with
  Martin
  Mike.</p>
  <p>Any suggestions?</p>
  <p>Thanks</p>