WheelPrize class final

奖品扇区;选奖权重与扇区大小互相独立。

Annotations

Constructors

WheelPrize({LuckyFill? background, List<LuckyText> texts = const [], List<LuckyImage> images = const [], double? weight, double sectorWeight = 1, bool disabled = false, WheelPrizePainter? painter, String? semanticsLabel})
创建奖品;sectorWeight 应为有限正数,weight 缺省时不可被默认 picker 选中。
const

Properties

background → LuckyFill?
背景,null 使用转盘默认样式。
final
disabled → bool
是否排除默认随机选奖。
final
hashCode → int
与值相等性一致的哈希。
no setteroverride
images → List<LuckyImage>
图片项。
final
painter → WheelPrizePainter?
在扇区局部坐标中录制的自定义内容。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sectorWeight → double
扇区相对大小,应为有限正数。
final
semanticsLabel → String?
无障碍描述。
final
texts → List<LuckyText>
文字项。
final
weight → double?
随机选奖权重。
final

Methods

copyWith({LuckyFill? background, List<LuckyText>? texts, List<LuckyImage>? images, double? weight, double? sectorWeight, bool? disabled, WheelPrizePainter? painter, String? semanticsLabel}) → WheelPrize
返回仅替换非 null 参数的副本。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
按奖品字段比较。
override