StoryPaintResources class

Everything the painters need that is not in the StoryDocument: fonts by id, decoded sticker images by id and filters by id.

Sticker images must be decoded before painting because a Canvas cannot wait for an ImageProvider. Build one with StoryPaintResources.load (see story_paint_resources_loader.dart).

Constructors

StoryPaintResources({required List<StoryFont> fonts, required Map<String, Image> stickerImages, required List<StoryFilter> filters})
Creates resources.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

filter(String? id) → StoryFilter?
The filter with id, or null for none/unknown.
font(String id) → StoryFont
The font with id, or the first configured font.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putSticker(String id, Image image) → void
Registers a decoded sticker (editor loads them lazily).
sticker(String id) → Image?
The decoded sticker with id, if loaded.
toString() → String
A string representation of this object.
inherited

Operators

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