Skip to content
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

undo Move #27

Open
gaurang77545 opened this issue May 12, 2022 · 3 comments
Open

undo Move #27

gaurang77545 opened this issue May 12, 2022 · 3 comments

Comments

@gaurang77545
Copy link

Hey can you tell me how to use undoMove functionality propperly or provide a code snippet .I have tried the following but it's not working
IconButton(
icon: Icon(Icons.undo_outlined),
onPressed: () {
controller.undoMove();
},
),

@RottenSchnitzel
Copy link

same here. controller.undoMove() seems to not work properly anymore!

@MirrorSpring
Copy link

I think it can't undo the Pawn move.

@knaveenchand
Copy link

As a workaround, I am using the game undo_move method directly and notifying the listeners:

IconButton(
  icon: Icon(Icons.undo),
  onPressed: (){
  controller.game.undo_move();
  controller.notifyListeners();
 }
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants