class
Resource

A resource that can be read into the program.

A resource is data that can be located using a URI and read into the program at runtime. The URI may use the package scheme to read resources provided along with package sources.

Properties

Uri uri
read-only
The location uri of this resource.

Constructors

Resource(String uri)
const
Creates a resource object with the given uri as location.

Methods

openRead() → Stream<List<int>>
Read the resource content as a stream of bytes.
readAsBytes() → Future<List<int>>
Read the resource content.
readAsString({Encoding encoding}) → Future<String>
Read the resource content as a string.