copyWith method

InsanichessGameSettings copyWith({
  1. bool? allowUndo,
  2. bool? alwaysPromoteToQueen,
  3. AutoZoomOutOnMoveBehaviour? autoZoomOutOnMove,
})

Returns a new InsanichessGameSettings object by overriding existing field values with those given in arguments.

Implementation

InsanichessGameSettings copyWith({
  bool? allowUndo,
  bool? alwaysPromoteToQueen,
  AutoZoomOutOnMoveBehaviour? autoZoomOutOnMove,
}) {
  return InsanichessGameSettings(
    allowUndo: allowUndo ?? this.allowUndo,
    alwaysPromoteToQueen: alwaysPromoteToQueen ?? this.alwaysPromoteToQueen,
    autoZoomOutOnMove: autoZoomOutOnMove ?? this.autoZoomOutOnMove,
  );
}