copyWith method

InsanichessSettings copyWith({
  1. InsanichessOtbSettings? otb,
  2. InsanichessLiveGameSettings? live,
  3. bool? showZoomOutButtonOnLeft,
  4. bool? showLegalMoves,
})

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

Implementation

InsanichessSettings copyWith({
  InsanichessOtbSettings? otb,
  InsanichessLiveGameSettings? live,
  bool? showZoomOutButtonOnLeft,
  bool? showLegalMoves,
}) {
  return InsanichessSettings(
    otb: otb ?? this.otb,
    live: live ?? this.live,
    showZoomOutButtonOnLeft:
        showZoomOutButtonOnLeft ?? this.showZoomOutButtonOnLeft,
    showLegalMoves: showLegalMoves ?? this.showLegalMoves,
  );
}