onPromoted property
Callback when pawn is promoted either by user or the default one PieceType.queen when user fails to select a piece. This callback is made when either onReachingPromotionRank or the _defaultPromotionDialog returns a value (true or false).
Implementation
final Function(Position position, ChessPiece? promotedTo)? onPromoted;