copyWith method
GridConfig
copyWith({
- int? rows,
- int? cols,
- List<
LuckyBoxBlock> ? blocks, - List<
GridPrize> ? prizes, - List<
GridButton> ? buttons, - GridOptions? options,
- GridStyle? style,
- LuckyCellStyle? activeStyle,
返回替换非空参数的副本,例如 value.copyWith() 保留配置。
Implementation
GridConfig copyWith(
{int? rows,
int? cols,
List<LuckyBoxBlock>? blocks,
List<GridPrize>? prizes,
List<GridButton>? buttons,
GridOptions? options,
GridStyle? style,
LuckyCellStyle? activeStyle}) =>
GridConfig(
rows: rows ?? this.rows,
cols: cols ?? this.cols,
blocks: blocks ?? this.blocks,
prizes: prizes ?? this.prizes,
buttons: buttons ?? this.buttons,
options: options ?? this.options,
style: style ?? this.style,
activeStyle: activeStyle ?? this.activeStyle);