Metronome
2015-06-26 01:18:36 UTC
How do you read files from a compiled dart file?
I have a method like this:
void _getImages() {
List<String> images = new List<String>();
//var u=path.fromUri("web/images");
//print(u);
var f = new Directory("web/images");
f.list(recursive: false, followLinks: false)
.listen((FileSystemEntity entity) {
images.add(entity.path);
});
_createSlideElements(images);
}
However I get an error when running this in chrome:
Unsupported Operation Platform._operatingSystem
What is the correct way of setting this up? Eventually I want to be able
to pass the path into the component through the template.
I have a method like this:
void _getImages() {
List<String> images = new List<String>();
//var u=path.fromUri("web/images");
//print(u);
var f = new Directory("web/images");
f.list(recursive: false, followLinks: false)
.listen((FileSystemEntity entity) {
images.add(entity.path);
});
_createSlideElements(images);
}
However I get an error when running this in chrome:
Unsupported Operation Platform._operatingSystem
What is the correct way of setting this up? Eventually I want to be able
to pass the path into the component through the template.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.