title: Flutter field has not been initialized
body: <p>i have a bool that i set to true if the account datas is right but my bool is set to late and it doesnt works</p>
  <p>My Model:</p>
  <pre><code>bool _result = false;
  
  Future login(String username, String password) async {
  
  var url = &quot;http://192.168.178.75/flutterconn/login.php&quot;;
  var response = await http.post(Uri.parse(url), body: {
    &quot;username&quot;: username,
    &quot;password&quot;: password,
  });
  
  var data = await json.decode(response.body);
  
  if (data == &quot;success&quot;) {
    setResult(true);
    Fluttertoast.showToast(msg: &quot;Erfolgreich Eingeloggt&quot;,toastLength: Toast.LENGTH_SHORT,gravity: ToastGravity.CENTER,fontSize: 16.0);
    
  }else {
    Fluttertoast.showToast(msg: &quot;Nicht Eingeloggt&quot;,toastLength: Toast.LENGTH_SHORT,gravity: ToastGravity.CENTER,fontSize: 16.0);
  }
  //print(_result);
  notifyListeners();
  }
  
  Future setResult(bool rs) async{
  _result = await rs;
  notifyListeners();
  }
  
  bool getResult(){
  return _result;
  }
  </code></pre>
  <p>My onPressed Method:</p>
  <pre><code>context.read&lt;LoginModel&gt;().login(
                      usernameController.text, passwordController.text);
                  print(context.read&lt;LoginModel&gt;().getResult());
  
                  if (context.read&lt;LoginModel&gt;().getResult()) {
  
                    context.read&lt;FoodSelectionModel&gt;().loadGalleryLinks();
  
                    Navigator.push(
                      context,
                      MaterialPageRoute(
                          builder: (context) =&gt; FoodSelectionScreen()),
                    );
                  }
  </code></pre>
  <p>My Error:</p>
  <p>The following LateError was thrown while handling a gesture:
  LateInitializationError: Field '_result@21188420' has not been initialized.</p>
  <p>The Bool is turned to late to true how can i set it faster.</p>