DEPRECATED. A resource that can be read into the program.

WARNING: This API is deprecated, and it will be removed in 1.14. Please use https://pub.dartlang.org/packages/resource instead.

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.

Annotations

Constructors

Resource(String uri)

Creates a resource object with the given uri as location.

const
factory

Properties

hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited
uri Uri

The location uri of this resource.

read-only

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
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.

toString() String

Returns a string representation of this object.

inherited