Flutter: how to load file for testing : <p>File can be read from the directory relative to the dart script file, simply as <code>var file = new File('./fixture/contacts.json')</code>.</p>

<p>However the file cannot be read flutter test running inside IDE. </p>

<p><a href="https://stackoverflow.com/questions/44816042/flutter-read-text-file-from-assets">Loading as resource</a> (it is not, since I do not want to bundle the test data file in the app) also does not work in test.</p>

<p>What is a good way to read file in flutter (for both command line test and IDE test)?</p>

<p>Running <code>flutter test</code> is very fast. However testing inside Intellij IDE is ver slow, but it can set debug breakpoint and step into and view variables. So both testing is very useful.</p>
