LuckySlotMachine class

受控老虎机;通过外部 SlotController 调用 play、stopEach。

Inheritance
Implementers

Constructors

LuckySlotMachine({Key? key, required SlotConfig config, LuckyController<SlotConfig, SlotLayout, SlotFrame, SlotResult>? controller, LuckyRenderer<SlotConfig, SlotLayout, SlotFrame, SlotResult>? renderer, Widget overlayBuilder(BuildContext context, LuckySurfaceData<SlotConfig, SlotLayout, SlotFrame> data)?, 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<SlotLayout, SlotFrame>> layers = const [], LuckyPerformanceOptions performance = const LuckyPerformanceOptions(), LuckyTextScaling textScaling = LuckyTextScaling.none, String? semanticsLabel, String semanticsValueBuilder(LuckyPhase phase, SlotResult? result)?})
创建老虎机;无外部控制器时由宿主创建并释放。
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
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
onReady → VoidCallback?
全部请求均有结论。
finalinherited
onStart → VoidCallback?
命中按钮且当前允许开始时触发,不自动调用 play。
finalinherited
overlayBuilder → Widget Function(BuildContext context, LuckySurfaceData<SlotConfig, SlotLayout, SlotFrame> data)?
在表面上构建可选奖品 Widget 层,使用 data 中已应用的布局和帧通知。
final
performance → LuckyPerformanceOptions
缓存、采样及隐藏暂停策略。
finalinherited
renderer → LuckyRenderer<SlotConfig, SlotLayout, SlotFrame, SlotResult>?
保留既有后端,并按需组合 Widget 叠加层。
no setteroverride
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<LuckyGameView<SlotConfig, SlotLayout, SlotFrame, SlotResult>>
创建通用宿主状态。
inherited
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