title: List of files in flutter
body: <p>I have images and I want to load them to my appplication.
  my_app/lib/... - here my source files
  my_app/assets/images/... - here my images</p>
  
  <p>I need to get list of files in assets/images/ and after that show some of them (according to other logic)
  I'm trying this</p>
  
  <pre><code>final dir = Directory("assets/images/");
  print(dir.existsSync());    // &lt;---- it also print: false
  var files = dir.listSync().toList();
  files.forEach((e) =&gt; list.add(MyImageItem(e.path)));
  </code></pre>
  
  <p>The problem is: I recieve exception</p>
  
  <pre><code>FileSystemException: Directory listing failed, path = 'assets/images/'
  (OS Error: No such file or directory, errno = 2)
  </code></pre>
  
  <p>I've tried different ways: assets/images/, images/, images and so on
  My pubspec.yaml</p>
  
  <pre><code>flutter:
    assets:
      - assets/images/
      - assets/
  </code></pre>
  
  <p>When I create Image directly all is fine</p>
  
  <pre><code>new Image(image: AssetImage("assets/images/cat.png"))
  </code></pre>
  
  <p>I knew that previously (month ago) each resource has to be declared in pubspec.yaml directly, but now assets/images/ is ok.
  I can load file by direct path. Why I can't access a directory? How to get list of files in directory to get them from my code?</p>