title: Issue in custom flutter search widget's search results selection - flutter web
body: <p>I build a simple search widget for flutter web. Everything working fine but after I got the search results, I have to click twice on the result to select a specific search result. Please help me to figure out the problem. I tried for several day but no luck. I'm using flutter 2.5.2 version.</p>
  <p><a href="https://dartpad.dev/embed-flutter.html?id=bd4b3f7e6c8c08c1b9ec30c42e2b9a4e" rel="nofollow noreferrer">darpad link</a> to run the code</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:flutter/widgets.dart';
  
  void main() {
    runApp(MaterialApp(
      home: SearchView(),
    ));
  }
  
  class SearchView extends StatefulWidget {
    @override
    State&lt;SearchView&gt; createState() =&gt; _SearchViewState();
  }
  
  class _SearchViewState extends State&lt;SearchView&gt; {
    String searchResult = '';
    final textController = TextEditingController();
    final List&lt;String&gt; data = ['Result 1', 'Result 2', 'Result 3', 'Result 4'];
  
    Future&lt;List&lt;String&gt;&gt; loadData() {
      return Future.delayed(Duration(seconds: 1), () {
        if (this.textController.text.trim().length != 0) {
          return data;
        } else {
          return [];
        }
      });
    }
  
    @override
    void initState() {
      this.textController.addListener(this._onTextChanged);
      super.initState();
    }
  
    void _onTextChanged() {
      print('text cahnged');
      setState(() {});
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text('Brand'),
        ),
        body: SingleChildScrollView(
          child: Column(
            children: [
              TextFormField(
                controller: this.textController,
              ),
              FutureBuilder(
                future: loadData(),
                builder:
                    (BuildContext context, AsyncSnapshot&lt;List&lt;String&gt;&gt; snapshot) {
                  if (snapshot.connectionState == ConnectionState.done &amp;&amp;
                      snapshot.hasData) {
                    print(&quot;future build&quot;);
                    return Column(
                      crossAxisAlignment: CrossAxisAlignment.stretch,
                      children: [
                        for (String result in snapshot.data)
                          InkWell(
                            onTap: () {
                              print('Clicked');
                              setState(() {
                                this.textController.clear();
                                this.searchResult = result;
                              });
                            },
                            child: Text(result),
                          ),
                      ],
                    );
                  } else {
                    return CircularProgressIndicator();
                  }
                },
              ),
              Text('Search result is ${searchResult}'),
            ],
          ),
        ),
      );
    }
  }
  
  </code></pre>
  <p>Please help me to fix this issue. Thank you and have a nice day</p>