copyWith method

ShogiBoardStyle copyWith({
  1. double? maxSize,
  2. Color? pieceColor,
  3. Color? promotedPieceColor,
  4. Color? cellColor,
  5. Color? borderColor,
  6. bool? usesJapanese,
  7. bool? showCoordIndicators,
  8. CoordIndicatorType? coordIndicatorType,
})

Creates a copy of this ShogiBoardStyle but with the given fields replaced with the new values.

Implementation

ShogiBoardStyle copyWith({
  double? maxSize,
  Color? pieceColor,
  Color? promotedPieceColor,
  Color? cellColor,
  Color? borderColor,
  bool? usesJapanese,
  bool? showCoordIndicators,
  CoordIndicatorType? coordIndicatorType,
}) =>
    ShogiBoardStyle(
      maxSize: maxSize ?? this.maxSize,
      pieceColor: pieceColor ?? this.pieceColor,
      promotedPieceColor: promotedPieceColor ?? this.promotedPieceColor,
      cellColor: cellColor ?? this.cellColor,
      borderColor: borderColor ?? this.borderColor,
      usesJapanese: usesJapanese ?? this.usesJapanese,
      showCoordIndicators: showCoordIndicators ?? this.showCoordIndicators,
      coordIndicatorType: coordIndicatorType ?? this.coordIndicatorType,
    );