CapsulePrize class final
扭蛋奖品;文字和图片在开蛋卡片中展示。
- Annotations
Constructors
-
CapsulePrize({required LuckyFill topFill, required LuckyFill bottomFill, List<
LuckyText> texts = const [], List<LuckyImage> images = const [], double? weight, bool disabled = false, CapsulePrizePainter? painter}) -
创建不可变配置;列表由调用方保持不可变。
const
Properties
- bottomFill → LuckyFill
-
下半球填充。
final
- disabled → bool
-
是否禁止随机选中。
final
- hashCode → int
-
与字段值一致的哈希。
no setteroverride
-
images
→ List<
LuckyImage> -
奖品卡图片。
final
- painter → CapsulePrizePainter?
-
卡片自定义绘制回调。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
texts
→ List<
LuckyText> -
奖品卡文字。
final
- topFill → LuckyFill
-
上半球填充。
final
- weight → double?
-
选奖权重;空权重不可选。
final
Methods
-
copyWith(
{LuckyFill? topFill, LuckyFill? bottomFill, List< LuckyText> ? texts, List<LuckyImage> ? images, double? weight, bool? disabled, CapsulePrizePainter? painter}) → CapsulePrize -
返回替换非空参数的副本,例如
value.copyWith()保留全部字段。 -
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