title: How can we get value from future method in flutter?
body: <p>I have this function returning the "SharedPreference" value stored in it.</p>
  
  <pre class="lang-dart prettyprint-override"><code>  Future&lt;bool&gt; getLoginStatus() async {
      final prefs = await SharedPreferences.getInstance();
      final loggedInStatus = prefs.getBool("loggedInStatus");
  
      if (loggedInStatus == null) {
        return false;
      }
      return loggedInStatus;
    }
  </code></pre>
  
  <p>Above function is in the class named "Constants.dart". When I do the test of extracting value from "getLoginStatus()" function by simple printing in different class.</p>
  
  <pre class="lang-dart prettyprint-override"><code> print("Login status : " + Constants().getLoginStatus().toString());
  </code></pre>
  
  <p>It give me below as an output. Why "Instance of 'Future'"? Why not simple either true or false?</p>
  
  <pre class="lang-dart prettyprint-override"><code>I/flutter (19683): Login status : Instance of 'Future&lt;bool&gt;'
  </code></pre>