WheelGame class final
无状态大转盘策略;例如传给 LuckyGameView 使用自定义宿主。
- Inheritance
-
- Object
- LuckyGame<
WheelConfig, WheelLayout, WheelFrame, LuckyResult< WheelPrize> > - WheelGame
Constructors
- WheelGame()
-
创建可复用的玩法策略。
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
itemGeometry
→ LuckyItemGeometry<
WheelLayout, WheelFrame> -
返回奖品几何;盒子顶边中点位于扇区外缘,局部正 y 指向圆心。
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wantsPanGestures → bool
-
是否启用拖动手势。
no setterinherited
Methods
-
collectImages(
WheelConfig config, WheelLayout layout) → List< LuckyImageRequest> -
收集三组图片;仅为显式指定的宽高提供解码提示,保留自然宽高比。
override
-
computeLayout(
WheelConfig config, LuckyLayoutInput input) → WheelLayout -
按配置和环境计算零旋转角的布局。
override
-
createController(
) → WheelController -
创建由宿主负责释放的默认控制器。
override
-
createDefaultRenderer(
) → WheelCanvasRenderer -
创建默认 Canvas 后端。
override
-
handlePan(
LuckyController< WheelConfig, WheelLayout, WheelFrame, LuckyResult< controller, WheelLayout layout, LuckyPanEvent event) → voidWheelPrize> > -
接收拖动事件;默认无操作。
inherited
-
hitTestAll(
WheelConfig config, WheelLayout layout, WheelFrame frame, Offset position) → List< LuckyHit> -
返回包含
position的最小半径按钮;边界算命中,无按钮返回空。override -
isStructuralChange(
WheelConfig oldConfig, WheelConfig newConfig) → bool -
数量、扇区权重或起始角变化会改变停止几何。
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveConfig(
BuildContext context, WheelConfig config) → WheelConfig -
按运行环境(例如系统减少动效)解析实际使用的配置;默认原样返回。
inherited
-
semanticsLabel(
WheelConfig config) → String -
返回包含奖品数量的默认无障碍标签。
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited