title: Flutter - error no such file or directory when reading JSON file
body: <p>Hi so I am trying to convert JSON to objects but when I read the file it throws up an exception:</p>
  
  <blockquote>
    <p>FileSystemException: Cannot open file, path = 'D:/AndroidStudio/my_app/assets/data/questions.json' (OS Error: No such file or directory, errno = 2)</p>
  </blockquote>
  
  <p>here is the code:</p>
  
  <pre><code>String loadQuestionAsset() {
    String jsonString;
    new File('D:/AndroidStudio/my_app/assets/data/questions.json').readAsString().then((String contents) {
      jsonString = contents;
    });
    return jsonString;
  }
  List&lt;Question&gt; parseJsonForQuestion() {
    Map decoded = jsonDecode(loadQuestionAsset());
    List&lt;Question&gt; questions = new List&lt;Question&gt;();
    for (var question in decoded['questions']) {
      questions.add(new Question(question['question'], question['bool']));
    }
    return questions;
  }
  </code></pre>
  
  <p>and the JSON file:</p>
  
  <pre><code>{
    "questions": [
      {
        "question": "Elon Musk is human",
        "bool": false
      },
      {
        "question": "Pizza is healthy",
        "bool": false
      },
      {
        "question": "Flutter is awesome",
        "bool": true
      }
    ]
  }
  </code></pre>
  
  <p>Thanks for help :)</p>