LocalResource<T> class

A local resources such as a native file or browser cache.

Inheritance
Implementers

Constructors

LocalResource({@required String path, Parser<T> parser})

Properties

basename → String
The basename() of the path.
read-only
data → T
Synchronously get the most recently loaded data.
read-only, override
exists → Future<bool>
read-only
lastModified → Future<DateTime>
Returns null if exists is false.
read-only
parser Parser<T>
final
path → String
This resource's path on the system.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
location → String
The location (a path or url) of the resource.
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

delete() → Future<void>
Remove this resource from disk and sets data to null. [...]
@mustCallSuper
get({bool forceReload: false}) → Future<T>
Gets the most readily available data or refreshes it if forceReload is true.
override
parseContents(dynamic contents) → T
contents is a String or List<int>, depending on whether the underlying resource is binary or string based. [...]
preParseContents(dynamic contents) → dynamic
For internal parsing before calling parseContents.
write(dynamic contents) → Future<T>
Persist the contents to disk. [...]
@mustCallSuper
fetchContents() → Future
Fetch the raw contents from the underlying platform. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited