Skip to content

Commit

Permalink
Ajust board with border
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Dec 16, 2024
1 parent 716893b commit 728a2b7
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions lib/src/widgets/board.dart
Original file line number Diff line number Diff line change
Expand Up @@ -402,26 +402,23 @@ class _BoardState extends State<Chessboard> {
),
);

final coloredBoard =
widget.settings.hue != 0 || widget.settings.brightness != 0
? ChangeColors(
hue: widget.settings.hue,
brightness: widget.settings.brightness,
child: board,
)
: board;

if (settings.border != null) {
return BorderedChessboard(
size: widget.size,
orientation: widget.orientation,
border: settings.border!,
showCoordinates: settings.enableCoordinates,
child: coloredBoard,
);
}

return coloredBoard;
final borderedChessboard = settings.border != null
? BorderedChessboard(
size: widget.size,
orientation: widget.orientation,
border: settings.border!,
showCoordinates: settings.enableCoordinates,
child: board,
)
: board;

return widget.settings.hue != 0 || widget.settings.brightness != 0
? ChangeColors(
hue: widget.settings.hue,
brightness: widget.settings.brightness,
child: borderedChessboard,
)
: borderedChessboard;
}

@override
Expand Down

0 comments on commit 728a2b7

Please sign in to comment.