LottoOptions class final
摇奖参数;例如 const LottoOptions(sortResults: false) 保留展示顺序。
- Annotations
Constructors
- LottoOptions({Duration drawInterval = const Duration(milliseconds: 700), Duration ballFlightTime = const Duration(milliseconds: 500), bool sortResults = true, double drawMix = 0.6, double ballRadiusFactor = 0.11, LuckyMotionOptions motion = const LuckyMotionOptions(speed: 12, accelerationTime: _motionTime, decelerationTime: _motionTime), LuckyPhysics? physics})
-
创建参数;时长必须为正,搅拌强度在零到一之间。
const
Properties
- ballFlightTime → Duration
-
单球从容器飞到槽内的时长。
final
- ballRadiusFactor → double
-
号码球半径占容器半径的比例,必须大于零且小于一。
final
- drawInterval → Duration
-
相邻球开始飞行的间隔。
final
- drawMix → double
-
开奖期间的搅拌强度。
final
- hashCode → int
-
与相等性一致的哈希。
no setteroverride
- motion → LuckyMotionOptions
-
加速、减速与时间基准参数。
final
- physics → LuckyPhysics?
-
实验性(可能调整):物理碰撞模式参数;null 保持参数化轨迹(默认)。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sortResults → bool
-
每池出完球后是否升序展示,不改变结果中的抽出顺序。
final
Methods
-
copyWith(
{Duration? drawInterval, Duration? ballFlightTime, bool? sortResults, double? drawMix, double? ballRadiusFactor, LuckyMotionOptions? motion, LuckyPhysics? physics}) → LottoOptions -
返回替换非空参数的副本,例如
options.copyWith(drawMix: 0.5); 无法用 null 清除physics,需要关闭物理模式时重新构造。 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withoutPhysics(
) → LottoOptions -
返回去掉物理模式、其余字段不变的副本,例如关闭
LottoOptions(physics: ...)。
Operators
-
operator ==(
Object other) → bool -
按所有动画参数比较。
override