Open EmmetSchuler opened 1 month ago
To fix this issue we'll need to make a change in the lib/src/widgets/board_editor.dart
flutter package file since it's code specifies calling the same function on tap and drag actions. Can someone help me with where I will need to make the changes and also publish a new version?
Files for reference:
lib/src/view/coordinate_training/coordinate_training_screen.dart
- onGuess
method called inside function passed to onEditedSquare
on tap/drag.[user_path]/.pub-cache/hosted/pub.dev/chessground-5.1.1/lib/src/widgets/board_editor.dart
- _onTouchedEvent
calls onEditedSquare
You'd need to make a PR at https://github.com/lichess-org/flutter-chessground
Note however, that this behavior is actually intended for the actual board editor (so that you can drag a finger across the board and delete pieces at every location it touches for example).
So probably, the solution would be to add a new field to the EditorPointerMode enum that has the intended behavior
Another way of fixing it is to add an onTappedSquare
to the Chessboard
widget (and don't use the BoardEditor
widget.
What is the problem?
When using the coordinate trainer, players tap on the square in order to select it. However as of now players can slide their finger around and it will continue to select the square under their finger. This can be confusing, because no other board behaves in this way. I also don't believe this is intended behavior.
Steps to reproduce the bug
Go to coordinate trainer Tap your finger on a square Now continue to drag your finger across the board
Expected: no more inputs are received until you lift your finger up and down again What happened: Inputs are received as long as the finger remains moving
App version
0.11.0
Device Info
Pixel 6 and Android 14
Additional information
No response