Skip to content

Commit

Permalink
Fix settings copyWith
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Nov 4, 2024
1 parent 0066156 commit e6532e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/board_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class ChessboardSettings {
return ChessboardSettings(
colorScheme: colorScheme ?? this.colorScheme,
pieceAssets: pieceAssets ?? this.pieceAssets,
border: border,
borderRadius: borderRadius ?? this.borderRadius,
boxShadow: boxShadow ?? this.boxShadow,
enableCoordinates: enableCoordinates ?? this.enableCoordinates,
Expand Down
10 changes: 10 additions & 0 deletions test/board_settings_test.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:chessground/chessground.dart';

Expand Down Expand Up @@ -34,6 +35,15 @@ void main() {
.colorScheme,
ChessboardColorScheme.blue,
);

expect(
const ChessboardSettings(
border: BoardBorder(color: Color(0xFFFFFFFF), width: 16.0),
).copyWith(),
const ChessboardSettings(
border: BoardBorder(color: Color(0xFFFFFFFF), width: 16.0),
),
);
});
});
}

0 comments on commit e6532e2

Please sign in to comment.