LuckyImageResolver class final
图片解析器:首帧、目标解码、转换、后备图和失效资源由实例管理。
调用 update(requests, configuration, dpr) 更新请求;用完须调用 dispose。
- Implemented types
Constructors
-
LuckyImageResolver({required VoidCallback onChanged, required ValueChanged<
LuckyImageError> onError, required VoidCallback onReady}) - 创建解析器;三个回调均在对应事件有结论时调用。
Properties
- debugDecodedBytes → int
-
当前持有图片的 RGBA 字节估算。
no setter
- debugListenerCount → int
-
当前本解析器挂接的监听数,不含 Flutter 全局缓存监听。
no setter
- generation → int
-
当前图片版本。
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- images → LuckyImageSet
-
当前只读图片集合。
no setter
- isSettled → bool
-
所有图片是否都有结论。
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - 移除全部监听并释放持有图片;可重复调用。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
List< LuckyImageRequest> requests, ImageConfiguration configuration, double devicePixelRatio) → void - 更新图片请求;相同槽位、源、转换器、配置和滞回内尺寸复用首帧。
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
LuckyImageSlot slot) → LuckyResolvedImage? -
返回对应槽位的已解析图片。
override