withPiece method

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

All moves with the drop piece piece.

Implementation

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