onMove property
Callback when player moves. (if playAs is null, this function is called for both players moves, otherwise for only for the playAs). E.g. if the player is playing as white, this method receives callbacks only for white's moves.
Implementation
final Function(Position, Position)? onMove;