fromChar static method

Piece? fromChar(
  1. String ch
)

Implementation

static Piece? fromChar(String ch) {
  final role = Role.fromChar(ch);
  if (role != null) {
    return Piece(
        role: role, color: ch.toLowerCase() == ch ? Side.black : Side.white);
  }
  return null;
}