resource library
A Resource
is data that can be read into a Dart program.
A resource is identified by a URI. It can be loaded as bytes or data.
The resource URI may be a package:
URI.
Example:
var resource = new Resource("package:foo/foo_data.txt");
var string = await resource.readAsString(utf8);
print(string);
Example:
var resource = new Resource("http://example.com/data.json");
var obj = await resource.openRead() // Reads as stream of bytes.
.transform(utf8.fuse(JSON).decoder)
.first;
Classes
- Resource
- Base resource implementation.
- ResourceLoader
- Resource loading strategy.