title: How can i add Navigator.push for each result
body: <p>The code works fine, but i would like to add a different link for each result displaied.
  For example: if i click <em>America</em> i had to go to <em>AmericaPage()</em> , with Italy ItalyPage() and so on. I was thinking about a <em>List</em> with all links but i can't figure out how to implement it.
  Link screen for details: <a href="https://imgur.com/a/dxBXCXk" rel="nofollow noreferrer">https://imgur.com/a/dxBXCXk</a></p>
  <pre><code>import 'package:flutter/material.dart';
  class SearchByCityOrPerson extends StatefulWidget {
  
    late final String title;
  
    @override
    _SearchByCityOrPerson createState() =&gt; _SearchByCityOrPerson();
  }
  
  class _SearchByCityOrPerson extends State&lt;SearchByCityOrPerson&gt; with SingleTickerProviderStateMixin {
  
    List&lt;String&gt; _cities = ['America', 'Italy', 'France'];
  
    List&lt;String&gt; _persons = [&quot;John Smith&quot;, &quot;Alex Johnson&quot;, &quot;Jane Doe&quot;];
  
    List&lt;String&gt; _test = ['test','test','test'];
  
    List&lt;String&gt; _filteredList = [];
  
    List&lt;String&gt; _personsList = [];
  
    TextEditingController controller = new TextEditingController();
  
    late TabController _tabController;
  
    String filter = &quot;&quot;;
    String persons = &quot;&quot;;
    Icon actionIcon = new Icon(Icons.search);
    Widget appBarTitle = new Text(&quot;&quot;);
  
  
    void _handleTabIndex() {
      setState(() {});
    }
  
    @override
    void dispose() {
      controller.dispose();
      _tabController.removeListener(_handleTabIndex);
      _tabController.dispose();
      super.dispose();
    }
  
    @override
    void initState() {
      _tabController = TabController(length: 3, vsync: this, initialIndex: 0);
      _tabController.addListener(_handleTabIndex);
      setState(() {
        _filteredList = _cities;
        _personsList = _persons;
      });
      controller.addListener(() {
        if (controller.text.isEmpty) {
          setState(() {
            filter = &quot;&quot;;
            persons = &quot;&quot;;
            _filteredList = _cities;
            _personsList = _persons;
          });
        } else {
          setState(() {
            filter = controller.text;
            persons = controller.text;
          });
        }
      });
      super.initState();
    }
    
    @override
    Widget build(BuildContext context) {
      ListTile personListTile(String bookOrPerson) =&gt;
          ListTile(
            title: Text(
              bookOrPerson,
              style: TextStyle(
                  color: Colors.black45, fontWeight: FontWeight.bold),
            ),);
      Card personCard(bookOrPerson) =&gt; Card(
        child: Container(
          decoration: BoxDecoration(color: Colors.grey[300]),
          child: personListTile(bookOrPerson),
        ),
      );
  
      if ((filter.isNotEmpty)) {
        List&lt;String&gt; tmpList = &lt;String&gt;[];
        for (int i = 0; i &lt; _filteredList.length; i++) {
          if (_filteredList[i].toLowerCase().contains(
              filter.toLowerCase())) {
            tmpList.add(_filteredList[i]);
          }
        }
        _filteredList = tmpList;
      }
  
      if ((persons.isNotEmpty)) {
        List&lt;String&gt; _tmpList2 = &lt;String&gt;[];
        for (int i = 0; i &lt; _personsList.length; i++) {
          if (_personsList[i].toLowerCase().contains(
              persons.toLowerCase())) {
            _tmpList2.add(_personsList[i]);
          }
        }
        _personsList = _tmpList2;
      }
  
      final appBody = TabBarView(
          controller: _tabController,
          children: [
            Container(//first
              child: ListView.builder(
                scrollDirection: Axis.vertical,
                shrinkWrap: true,
                itemCount: _cities == null ? 0 : _filteredList.length,
                itemBuilder: (BuildContext context, int index) {
                  return personCard(_filteredList[index]);
                },
              ),
            ),
  
            Container(//second
              child: ListView.builder(
                scrollDirection: Axis.vertical,
                shrinkWrap: true,
                itemCount: _persons == null ? 0 : _personsList.length,
                itemBuilder: (BuildContext context, int index) {
                  return personCard(_personsList[index]);
                },
              ),
            ),
  
            Container(//third
              child: InkWell(
                child: ListView.builder(
                  scrollDirection: Axis.vertical,
                  shrinkWrap: true,
                  itemCount: _test == null ? 0 : _test.length,
                  itemBuilder: (BuildContext context, int index) {
                    return personCard(_test[index]);
                  },
                ),
              ),
            ),
          ]);
  
      final appTopAppBar = AppBar(
        elevation: 0.1,
        bottom: TabBar(
            controller: _tabController,
          tabs: [
            Tab(icon: Icon(Icons.pin_drop)),
            Tab(icon: Icon(Icons.directions_transit)),
            Tab(icon: Icon(Icons.directions_bike)),
          ],
        ),
        title: appBarTitle,
        actions: &lt;Widget&gt;[
          new IconButton(
            icon: actionIcon,
            onPressed: () {
              setState(() {
                if (this.actionIcon.icon == Icons.search) {
                  this.actionIcon = new Icon(Icons.close);
                  this.appBarTitle = new TextField(
                    controller: controller,
                    decoration: new InputDecoration(
                      prefixIcon: new Icon(Icons.search, color: Colors.white),
                      hintText: &quot;Search...&quot;,
                      hintStyle: new TextStyle(color: Colors.white),
                    ),
                    style: new TextStyle(
                      color: Colors.white,
                    ),
                    autofocus: true,
                    cursorColor: Colors.white,
                  );
                } else {
                  this.actionIcon = new Icon(Icons.search);
                  this.appBarTitle = new Text(_tabController.index == 0 ? &quot;Cities&quot; : &quot;Persons&quot;);
                  _filteredList = _cities;
                  _personsList = _persons;
                  controller.clear();
                }
              });
            },
          ),
        ],
      );
  
      return
        Scaffold(
          appBar: appTopAppBar,
          body: appBody,
        );
    }
  }
  
  
  </code></pre>