AssetRequest class final

What a resolver is being asked for.

One object rather than a bare string, so this can grow. A function type is frozen the day it is published: asking a resolver for a byte range, a priority, or which format wants the file means widening Future<Uint8List> Function(String), and that breaks every resolver anybody has written. Adding a field here does not.

Allocated per request, unlike the scratch a contact filter is handed — resolving an asset is I/O, and one small object beside a file read is not a cost worth a sentence anywhere but this one.

Constructors

AssetRequest(String uri)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
uri → String
What was asked for, relative to whatever the resolver treats as its root.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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