How to check which the current Route is? : <p>I want to navigate to different Routes using a Drawer, though I do not want to open a new instance of a Route each time I tap on it if I am already on that Route, rather I would prefer that in this case a new Route is not opened. This is my code so far:</p>

<pre><code>Widget build(BuildContext context){
    return new Drawer(
      child:
          new ListView(
            children: &lt;Widget&gt;[
              new ListTile(
                title: new Text("NewRoute"),
                onTap: () {
                    Navigator.of(context).pop;
                    Navigator.of(context).pushNamed('/NewRoute');
                }
              )
           )
     )
}
</code></pre>

<p>I want to use a conditional statement to check whether we are on a certain route. I know there is a way to check which Route we are on currently with the isCurrent of the Route class</p>

<p><a href="https://docs.flutter.io/flutter/widgets/Route/isCurrent.html" rel="noreferrer">https://docs.flutter.io/flutter/widgets/Route/isCurrent.html</a></p>

<p>though I am not sure how to implement it.</p>

<p>Thank you in advance!</p>
