title: Flutter how to access the map from Future Function
body: <p>New to dart, I want to access the value <code>userId</code> inside the <code>Map</code> object, but I keep getting an Error (See comment):</p>
  <pre><code>The method 'then' isn't defined for the type 'Function'.
  Try correcting the name to the name of an existing method, or defining a method named 'then'.
  </code></pre>
  <pre><code>  Future&lt;Map&gt; getData() async {
      Response load = await get('https://jsonplaceholder.typicode.com/todos/1');
      print(load.statusCode);
      print(load.body);
      Map map = jsonDecode(load.body);
      return map;
    }
  
    @override
    void initState() {
      var getit = getData;
      print('placeholder');
      getit.then((e){e['userId'];}); // I get an Error here
      super.initState();
    }
  </code></pre>