-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support toggling dragged piece shadows #55
Conversation
@@ -94,6 +95,9 @@ class ChessboardSettings { | |||
// Offset for the piece currently under drag | |||
final Offset dragFeedbackOffset; | |||
|
|||
/// Whether the dark shadow under dragged pieces is enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dark shadow sounds a bit ominous. What about "the shadow circle"?
@@ -94,6 +95,9 @@ class ChessboardSettings { | |||
// Offset for the piece currently under drag | |||
final Offset dragFeedbackOffset; | |||
|
|||
/// Whether the dark shadow under dragged pieces is enabled | |||
final bool pieceShadow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pieceShadow
can be confused with regular shadows of the pieces; so it should be renamed: draggedPieceShadow
for instance.
@@ -247,6 +256,9 @@ class ChessboardEditorSettings { | |||
// Offset for the piece currently under drag. | |||
final Offset dragFeedbackOffset; | |||
|
|||
// Whether the dark shadow under dragged pieces is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above. Also it should be a triple slash (not double).
@@ -169,21 +170,21 @@ class _BoardState extends State<Chessboard> { | |||
Widget build(BuildContext context) { | |||
final colorScheme = widget.settings.colorScheme; | |||
final ISet<Square> moveDests = widget.settings.showValidMoves && | |||
selected != null && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these indentation changes? Please format your code with dart format
.
Superseded with #59 |
This is needed to implement toggling the shadows underneath dragged pieces as proposed in lichess-org/mobile#977