Fix bug in onWillAccept. Set endSquare correctly.
This commit is contained in:
parent
42e90f10a6
commit
6f124b9a5f
@ -83,9 +83,9 @@ class ChessSquare extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
onWillAccept: (move) {
|
||||
final legalMove = context
|
||||
.read<ChessBloc>()
|
||||
.preCheckHandler(PreCheckMove(move: move!));
|
||||
move!.endSquare = coordinate;
|
||||
final legalMove =
|
||||
context.read<ChessBloc>().preCheckHandler(PreCheckMove(move: move));
|
||||
print('onWillAccept returns $legalMove');
|
||||
return legalMove;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user