DEPRECATED(类已被弃用)。表示可以读入程序的资源。

警告:这个API已经被标注为 deprecated, 并且将在1.14版本时删除。请使用 https://pub.dartlang.org/packages/resource 代替.

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

获取对象的哈希值。

read-only, inherited
runtimeType Type

表示对象的运行时类型。

read-only, inherited
uri Uri

The location uri of this resource.

read-only

Operators

operator ==(other) bool

相等操作符。

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

当一个不存在的函数或成员变量被访问时,该函数被调用。

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

返回一个用来表示对象的字符串。

inherited