LuckyLots class

Lots 受控组件;外部控制器归调用者所有。

Inheritance

Constructors

LuckyLots({Key? key, required LotsConfig config, LotsController? controller, LuckyRenderer<LotsConfig, LotsLayout, LotsFrame, LuckyResult<LotsStick>>? renderer, double? width, double? height, AlignmentGeometry alignment = Alignment.topLeft, VoidCallback? onStart, LuckyButtonTapCallback? onButtonTap, ValueChanged<int>? onItemTap, ValueChanged<LuckyResult<LotsStick>>? onEnd, ValueChanged<LuckyPhase>? onPhaseChanged, ValueChanged<LuckyImageError>? onImageError, VoidCallback? onReady, LuckyHooks hooks = const LuckyHooks(), List<LuckyLayer<LotsLayout, LotsFrame>> layers = const [], LuckyPerformanceOptions performance = const LuckyPerformanceOptions(), LuckyTextScaling textScaling = LuckyTextScaling.none, String? semanticsLabel, String semanticsValueBuilder(LuckyPhase phase, LuckyResult<LotsStick>? result)?})
创建组件;宽高为空时使用有界父约束,点按开始只通知回调。
const

Properties

alignment → AlignmentGeometry
非正方形容器中的对齐。
final
config → LotsConfig
不可变配置。
final
controller → LotsController?
可选外部控制器。
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
逻辑高度。
final
hooks → LuckyHooks
生命周期及绘制钩子。
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layers → List<LuckyLayer<LotsLayout, LotsFrame>>
自定义绘制层。
final
onButtonTap → LuckyButtonTapCallback?
任意阶段按钮点击。
final
onEnd → ValueChanged<LuckyResult<LotsStick>>?
正常结束或取消结果。
final
onImageError → ValueChanged<LuckyImageError>?
图片请求失败通知。
final
onItemTap → ValueChanged<int>?
已展示条目点击。
final
onPhaseChanged → ValueChanged<LuckyPhase>?
运动阶段变化。
final
onReady → VoidCallback?
全部图片已有结论时通知。
final
onStart → VoidCallback?
允许开始时点击按钮触发,不自动 play。
final
performance → LuckyPerformanceOptions
性能策略。
final
renderer → LuckyRenderer<LotsConfig, LotsLayout, LotsFrame, LuckyResult<LotsStick>>?
可替换渲染后端。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel → String?
无障碍标签。
final
semanticsValueBuilder → String Function(LuckyPhase phase, LuckyResult<LotsStick>? result)?
无障碍阶段和结果描述。
final
textScaling → LuckyTextScaling
文字缩放策略。
final
width → double?
逻辑宽度。
final

Methods

build(BuildContext context) → Widget
组合通用宿主并转发类型化回调。
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
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