LuckyLeverSlotMachine class
带拉杆、默认错峰停轮及赔付线高亮的老虎机。
例如传入 config 和 SlotController,在 onPull 中异步决定 stopEach 的目标。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LuckyGameView<
SlotConfig, SlotLayout, SlotFrame, SlotResult> - LuckySlotMachine
- LuckyLeverSlotMachine
Constructors
-
LuckyLeverSlotMachine({Key? key, required SlotConfig config, LuckyController<
SlotConfig, SlotLayout, SlotFrame, SlotResult> ? controller, LeverOptions lever = const LeverOptions(), VoidCallback? onPull, LuckyRenderer<SlotConfig, SlotLayout, SlotFrame, SlotResult> ? renderer, double? width, double? height, AlignmentGeometry alignment = Alignment.topLeft, ValueChanged<SlotResult> ? onEnd, ValueChanged<LuckyPhase> ? onPhaseChanged, void onCellPassed(int reel, int prizeIndex)?, ValueChanged<LuckyImageError> ? onImageError, VoidCallback? onReady, LuckyHooks hooks = const LuckyHooks(), List<LuckyLayer< layers = const [], LuckyPerformanceOptions performance = const LuckyPerformanceOptions(), LuckyTextScaling textScaling = LuckyTextScaling.none, String? semanticsLabel, String semanticsValueBuilder(LuckyPhase phase, SlotResult? result)?})SlotLayout, SlotFrame> > -
创建拉霸机;宽高包含拉杆区,其余参数与 LuckySlotMachine 一致。
const
Properties
- alignment → AlignmentGeometry
-
非正方形容器的对齐。
finalinherited
- config → SlotConfig
-
不可变配置。
finalinherited
-
controller
→ LuckyController<
SlotConfig, SlotLayout, SlotFrame, SlotResult> ? -
外部控制器,null 时由宿主创建。
finalinherited
-
game
→ LuckyGame<
SlotConfig, SlotLayout, SlotFrame, SlotResult> -
玩法策略。
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
可选逻辑高度。
finalinherited
- hooks → LuckyHooks
-
生命周期与绘制钩子。
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
layers
→ List<
LuckyLayer< SlotLayout, SlotFrame> > -
用户绘制层。
finalinherited
- lever → LeverOptions
-
拉杆布局、阈值和自动开始策略。
final
- onButtonTap → LuckyButtonTapCallback?
-
任意阶段的按钮点击。
finalinherited
-
onEnd
→ ValueChanged<
SlotResult> ? -
一局正常或作废结束。
finalinherited
-
onImageError
→ ValueChanged<
LuckyImageError> ? -
图片加载或转换失败。
finalinherited
- onItemPassed → void Function(int reel, int prizeIndex)?
-
越过条目的列和下标。
finalinherited
-
onItemTap
→ ValueChanged<
int> ? -
条目点击。
finalinherited
-
onPhaseChanged
→ ValueChanged<
LuckyPhase> ? -
运动阶段变化。
finalinherited
- onPull → VoidCallback?
-
每次有效拉杆调用;运动中也会调用,例如请求下一局的业务信息。
final
- onReady → VoidCallback?
-
全部请求均有结论。
finalinherited
- onStart → VoidCallback?
-
命中按钮且当前允许开始时触发,不自动调用 play。
finalinherited
-
overlayBuilder
→ Widget Function(BuildContext context, LuckySurfaceData<
SlotConfig, SlotLayout, SlotFrame> data)? -
在表面上构建可选奖品 Widget 层,使用 data 中已应用的布局和帧通知。
finalinherited
- performance → LuckyPerformanceOptions
-
缓存、采样及隐藏暂停策略。
finalinherited
-
renderer
→ LuckyRenderer<
SlotConfig, SlotLayout, SlotFrame, SlotResult> ? -
保留既有后端,并按需组合 Widget 叠加层。
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsLabel → String?
-
无障碍标签,null 使用玩法默认。
finalinherited
- semanticsValueBuilder → String Function(LuckyPhase phase, SlotResult? result)?
-
无障碍阶段与结果描述,null 时不提供 value。
finalinherited
- textScaling → LuckyTextScaling
-
系统文字缩放策略。
finalinherited
- width → double?
-
可选逻辑宽度。
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< LuckyLeverSlotMachine> -
创建独立回弹及控制器所有者。
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited