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) {
|
onWillAccept: (move) {
|
||||||
final legalMove = context
|
move!.endSquare = coordinate;
|
||||||
.read<ChessBloc>()
|
final legalMove =
|
||||||
.preCheckHandler(PreCheckMove(move: move!));
|
context.read<ChessBloc>().preCheckHandler(PreCheckMove(move: move));
|
||||||
print('onWillAccept returns $legalMove');
|
print('onWillAccept returns $legalMove');
|
||||||
return legalMove;
|
return legalMove;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user