copyWith method

GridButton 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. GridCellPainter? painter,
})

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

Implementation

GridButton copyWith(
        {int? x,
        int? y,
        int? col,
        int? row,
        LuckyCellStyle? style,
        List<LuckyText>? texts,
        List<GridImage>? images,
        GridCellPainter? painter}) =>
    GridButton(
        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,
        painter: painter ?? this.painter);