LuckyGame<C extends Object, L extends LuckyLayout, F extends LuckyFrame, R extends LuckyResult<Object?>> class abstract

无状态玩法 SPI;实现后可传给 LuckyGameView,无需修改 core。

Implementers

Constructors

LuckyGame()
常量构造。
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
itemGeometry → LuckyItemGeometry<L, F>?
可选条目几何;未提供时不支持条目叠加。
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
wantsPanGestures → bool
是否启用拖动手势。
no setter

Methods

collectImages(C config, L layout) → List<LuckyImageRequest>
返回本布局所需图片及解码尺寸提示。
computeLayout(C config, LuckyLayoutInput input) → L
由 config 和环境计算确定性布局。
createController() → LuckyController<C, L, F, R>
创建宿主拥有的默认控制器。
createDefaultRenderer() → LuckyRenderer<C, L, F, R>
创建玩法自身的默认渲染器。
handlePan(LuckyController<C, L, F, R> controller, L layout, LuckyPanEvent event) → void
接收拖动事件;默认无操作。
hitTestAll(C config, L layout, F frame, Offset position) → List<LuckyHit>
返回全部命中;重叠按钮按列表顺序逐个触发,无命中返回空。
isStructuralChange(C oldConfig, C newConfig) → bool
判断是否改变条目数等结构,以便减速期间延后应用。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveConfig(BuildContext context, C config) → C
按运行环境(例如系统减少动效)解析实际使用的配置;默认原样返回。
semanticsLabel(C config) → String
返回默认无障碍标签。
toString() → String
A string representation of this object.
inherited

Operators

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