copyWith method
返回只替换非空参数的布局;列表在使用期间不可修改。
sticks.length 必须等于 angles.length,pivot 通常取 cylinder.bottomCenter。
例如 base.copyWith(cylinder: rect, pivot: rect.bottomCenter)。
Implementation
LotsLayout copyWith(
{Size? size,
Rect? cylinder,
Offset? pivot,
List<Rect>? sticks,
List<double>? angles,
double? riseDistance,
Rect? card}) =>
LotsLayout(
size: size ?? this.size,
cylinder: cylinder ?? this.cylinder,
pivot: pivot ?? this.pivot,
sticks: sticks ?? this.sticks,
angles: angles ?? this.angles,
riseDistance: riseDistance ?? this.riseDistance,
card: card ?? this.card);