LuckyLotto class

受控摇奖机;按钮通过 onStart 通知,调用者决定何时 play 和 stop。

例如 LuckyLotto(config: LottoConfig.superLotto(), controller: controller)。

Inheritance

Constructors

LuckyLotto({Key? key, required LottoConfig config, LottoController? controller, LuckyRenderer<LottoConfig, LottoLayout, LottoFrame, LottoResult>? renderer, double? width, double? height, AlignmentGeometry alignment = Alignment.topLeft, VoidCallback? onStart, LuckyButtonTapCallback? onButtonTap, ValueChanged<int>? onItemTap, ValueChanged<LottoResult>? onEnd, ValueChanged<LuckyPhase>? onPhaseChanged, void onBallDrawn(int pool, int number)?, ValueChanged<LuckyImageError>? onImageError, VoidCallback? onReady, LuckyHooks hooks = const LuckyHooks(), List<LuckyLayer<LottoLayout, LottoFrame>> layers = const [], LuckyPerformanceOptions performance = const LuckyPerformanceOptions(), LuckyTextScaling textScaling = LuckyTextScaling.none, String? semanticsLabel, String semanticsValueBuilder(LuckyPhase phase, LottoResult? result)?})
创建摇奖机;onBallDrawn 每个落槽号码触发一次,参数为池下标和号码。
const

Properties

alignment → AlignmentGeometry
非正方形容器的对齐。
finalinherited
config → LottoConfig
不可变配置。
finalinherited
controller → LuckyController<LottoConfig, LottoLayout, LottoFrame, LottoResult>?
外部控制器,null 时由宿主创建。
finalinherited
game → LuckyGame<LottoConfig, LottoLayout, LottoFrame, LottoResult>
玩法策略。
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<LottoLayout, LottoFrame>>
用户绘制层。
finalinherited
onBallDrawn → void Function(int pool, int number)?
每个落槽号码的回调,参数为池下标与号码。
no setter
onButtonTap → LuckyButtonTapCallback?
任意阶段的按钮点击。
finalinherited
onEnd → ValueChanged<LottoResult>?
一局正常或作废结束。
finalinherited
onImageError → ValueChanged<LuckyImageError>?
图片加载或转换失败。
finalinherited
onItemPassed → void Function(int pool, int number)?
越过条目的列和下标。
finalinherited
onItemTap → ValueChanged<int>?
条目点击。
finalinherited
onPhaseChanged → ValueChanged<LuckyPhase>?
运动阶段变化。
finalinherited
onReady → VoidCallback?
全部请求均有结论。
finalinherited
onStart → VoidCallback?
命中按钮且当前允许开始时触发,不自动调用 play。
finalinherited
performance → LuckyPerformanceOptions
缓存、采样及隐藏暂停策略。
finalinherited
renderer → LuckyRenderer<LottoConfig, LottoLayout, LottoFrame, LottoResult>?
可替换的渲染后端。
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel → String?
无障碍标签,null 使用玩法默认。
finalinherited
semanticsValueBuilder → String Function(LuckyPhase phase, LottoResult? 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<LottoConfig, LottoLayout, LottoFrame, LottoResult>>
创建通用宿主状态。
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