copyWith method

GridPrize copyWith({
  1. int? x,
  2. int? y,
  3. int? col,
  4. int? row,
  5. LuckyCellStyle? style,
  6. List<LuckyText>? texts,
  7. List<GridImage>? images,
  8. double? weight,
  9. bool? disabled,
  10. GridCellPainter? painter,
})

返回替换非空参数的副本。

Implementation

GridPrize copyWith(
        {int? x,
        int? y,
        int? col,
        int? row,
        LuckyCellStyle? style,
        List<LuckyText>? texts,
        List<GridImage>? images,
        double? weight,
        bool? disabled,
        GridCellPainter? painter}) =>
    GridPrize(
        x: x ?? this.x,
        y: y ?? this.y,
        col: col ?? this.col,
        row: row ?? this.row,
        style: style ?? this.style,
        texts: texts ?? this.texts,
        images: images ?? this.images,
        weight: weight ?? this.weight,
        disabled: disabled ?? this.disabled,
        painter: painter ?? this.painter);