RemoteResources class
Everything a session has sent besides frames: images, text styles and fonts, plus a cache of laid-out text runs.
Constructors
- RemoteResources({RemoteFontCache? fontCache})
Properties
-
chunks
→ Map<
int, Uint8List> -
Recorded repaint boundaries by id; frames are trees of these.
final
- fontCache → RemoteFontCache
-
Where fonts are cached between sessions. Shared in memory by default.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
images
→ Map<
int, RemoteImage> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
styles
→ Map<
int, WireTextStyle> -
final
Methods
-
addFont(
ByteReader r) → Future< void> -
Handles a
fontsent in answer to a request. Files whose content does not match the hash are dropped, so a host cannot poison the cache. -
addFontOffer(
ByteReader r) → Future< Uint8List?> -
Handles a
fontOffer. Returns the hash to request from the host when the file is not cached, or null when it is already available. -
addStyles(
ByteReader r) → void -
clear(
) → void - Drops per-session state. Loaded fonts stay registered with the engine.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paragraph(
int styleId, String text, bool rtl) → Paragraph? - A single-line paragraph for one run, laid out at its natural width.
-
releaseImage(
int id) → void -
setImage(
int id, RemoteImage image) → void -
textStyle(
int id) → TextStyle? -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
remoteFamily(
String familyKey) → String - Fonts from the host are registered under a name derived from the family's content, so they never clash with the viewer's own fonts or with another app's font of the same name.