title: The method 'listen' isn't defined for the class 'Function'?
body: <p>Hello everyone I am trying to build a flutter to display the latitude and the longitude but I still get an error here is the code :</p>
  
  <p><img src="https://i.stack.imgur.com/sUT0S.jpg" alt="capture 1"></p>
  
  <p><img src="https://i.stack.imgur.com/AQN8V.jpg" alt="capute"></p>
  
  <pre><code> void initState(){
      super.initState();
      //Default variable set 0
      currentLocation['latitude'] = 0.0;
      currentLocation['longtitude'] = 0.0;
  
      initPlatformState();
      locationSubscription = location.onLocationChanged.listen((Map&lt;String, double&gt; result){
        setState(() {
          currentLocation = result;
        });
      });
    }
  </code></pre>