withPromo method

List<Move> withPromo(
  1. String? piece
)

All moves with the promo piece piece.

Implementation

List<Move> withPromo(String? piece) =>
    where((e) => e.promo?.toLowerCase() == piece?.toLowerCase()).toList();